fix(dynamic-sampling): transaction management error#108117
Merged
Conversation
constantinius
approved these changes
Feb 12, 2026
Contributor
constantinius
left a comment
There was a problem hiding this comment.
Looks good! It could still be possible that the issue is not fixed with that when the scheduling is done in an atomic block.
jjbayer
approved these changes
Feb 13, 2026
Comment on lines
+322
to
+328
| if ( | ||
| options.get("relay.invalidation-direct-outside-atomic") | ||
| and not connections[transaction_db].in_atomic_block | ||
| ): | ||
| _do_schedule() | ||
| else: | ||
| transaction.on_commit(_do_schedule, using=transaction_db) |
Member
There was a problem hiding this comment.
Might be worth putting this in a custom on_commit function, basically replicate Django's on_commit without the self.get_autocommit() branch:
Member
Author
There was a problem hiding this comment.
I prefer doing it like this for now - it's clearer what happens instead of "hiding" this switching functionality in a custom on_commit
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.
Bug explanation:
Fix:
Fixes SENTRY-5GVE
Fixes SENTRY-5HMP
Fixes SENTRY-5HMN
Closes TET-1724