Repository navigation
Don't lose occurrences when concurrent writers create a ticket - #744
Merged
Merged
Conversation
Merging this PR will not alter performance1 warning
Comparing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #744 +/- ##
==========================================
+ Coverage 91.71% 91.76% +0.05%
==========================================
Files 49 49
Lines 8103 8153 +50
Branches 619 622 +3
==========================================
+ Hits 7432 7482 +50
Misses 538 538
Partials 133 133 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Two writers logging from the same new call site could both find no ticket and both insert one. The second insert failed on the unique record hash, and its occurrence was lost.
RazerM
force-pushed
the
fix/sqlalchemy-ticket-race
branch
from
November 9, 2026 23:59
e09b5d5 to
e7e861f
Compare
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.
When two threads or processes logged from the same new call site at the same time, both could find no existing ticket and try to create one. The second insert failed on the unique record hash, and
TicketingHandlerlost that occurrence.SQLAlchemyBackendnow retries such a write once, in a new transaction, which finds the ticket the other writer created.