Skip to content

storage: Avoid nested transactions during snapshot record recovery - #4165

Merged
stgraber merged 1 commit into
lxc:mainfrom
jovermier:fix-snapshot-repair-transactions
Oct 10, 2026
Merged

stgraber merged 1 commit into
lxc:mainfrom
jovermier:fix-snapshot-repair-transactions

Conversation

@jovermier

Copy link
Copy Markdown
Contributor

Finish the local-instance listing transaction before repairing snapshot volume records. Repair opens additional cluster transactions, so keeping the listing transaction open makes it wait for the database connection until the outer transaction times out.

Add a native database test covering missing-record repair, existing snapshot metadata, and idempotence. Two repair calls took 60.20 seconds on main and 0.19 seconds with the fix.

Validation: full Go suite, all 17 static-analysis recipe checks, and daemon/CLI builds passed. The repository's nonfatal govulncheck still reports existing dependency findings.

Signed-off-by: Jason Overmier <jason.r.overmier@gmail.com>
@jovermier
jovermier requested a review from stgraber as a code owner October 10, 2026 01:57
@stgraber
stgraber merged commit 039a070 into lxc:main Oct 10, 2026
177 of 187 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants