Skip to content

Bugfix: a reference cited with new text locked the database - #11

Merged
paulsaxe merged 1 commit into
masterfrom
citation-lookup-and-lock
Oct 24, 2026
Merged

paulsaxe merged 1 commit into
masterfrom
citation-lookup-and-lock

Conversation

@paulsaxe

Copy link
Copy Markdown
Collaborator
  • cite() found an existing citation only by its raw text. SEAMM's own citation
    holds its version in the text, so after an update it was inserted again and
    failed on the unique alias/DOI ("UNIQUE constraint failed: citation.doi"),
    leaving the transaction open. That held the database's lock: a resumed SEAMM job's
    parallel iterations then all failed with "database is locked" (SEAMM job 5366).
  • Citations are now also found by alias or DOI, with their text brought up to
    date; a failed citation is rolled back; and connections wait up to 30 s for a
    lock, since the iterations of a parallel loop share the job's database.
  • Tests for both; reproduced and fixed on a copy of job 5366's references.db.

For release 0.9.4.

🤖 Generated with Claude Code

cite() found an existing citation only by its raw text, so SEAMM's own
citation, whose text holds the version, was inserted again after an update
and failed on the unique alias/DOI -- leaving its transaction open, which
held the database's lock: a resumed SEAMM job's parallel iterations then
all failed with 'database is locked' (SEAMM job 5366). Citations are now
also found by alias or DOI (their text updated), a failed citation is
rolled back, and connections wait up to 30 s for a lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@paulsaxe paulsaxe left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@paulsaxe
paulsaxe merged commit 1047132 into master Oct 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant