fix: use READ_COMMITTED_SNAPSHOT on MSSQL (#39512) - #39513
Closed
silverwind wants to merge 6 commits into
Closed
silverwind wants to merge 6 commits into
silverwind wants to merge 6 commits into
Conversation
SQL Server can pick the pickup scan as deadlock victim when it races a concurrent claim, failing the runner's poll. Rerun the page on a fresh session instead, since the index-based fix on main needs a migration that can't go into a release branch. Assisted-by: Claude Code:claude-opus-5-5
Only the deadlock rerun needs a fresh session, so the regular scan keeps the session it already had. Assisted-by: Claude Code:claude-opus-5-5
bircni
approved these changes
Oct 1, 2026
silverwind
marked this pull request as draft
October 2, 2026 13:23
Member
Author
|
Working some more on #39512 which will decide what the backport then gets. |
Replaces the deadlock retry with the fix from go-gitea#39512. MSSQL's default READ COMMITTED takes shared locks on reads, so the runner pickup SELECT forms a lock cycle with concurrent claim UPDATEs. READ_COMMITTED_SNAPSHOT makes its reads see the last committed row version like PostgreSQL and MySQL, which needs no migration. Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Claude Code:claude-opus-5-5
Member
Author
|
Closing, #39512 now cherry-picks cleanly onto Written by Claude |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #39512. It needs no migration, so it replaces the deadlock retry with the same fix.