fix: shut down "session flusher" more promptly#4561
Merged
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #4561 +/- ##
==========================================
+ Coverage 80.68% 80.72% +0.04%
==========================================
Files 156 156
Lines 16482 16481 -1
Branches 2802 2801 -1
==========================================
+ Hits 13299 13305 +6
+ Misses 2299 2297 -2
+ Partials 884 879 -5
|
bukzor
added a commit
that referenced
this pull request
Jul 8, 2025
This follows the precedent set in transport.flush, and helps me with my project to assert thread hygeine in sentry test suite (related: DI-1008), but also makes the system much more deterministic for everyone. This will cause shutdown to be quite slow until #4561 goes in. So I'd reject this if you reject that.
sl0thentr0py
approved these changes
Jul 9, 2025
Member
sl0thentr0py
left a comment
There was a problem hiding this comment.
ignore previous review, was confused by the negation
bukzor
added a commit
that referenced
this pull request
Jul 9, 2025
This follows the precedent set in transport.flush, and helps me with my project to assert thread hygeine in sentry test suite (related: DI-1008), but also makes the system much more deterministic for everyone. This will cause shutdown to be quite slow until #4561 goes in. So I'd reject this if you reject that.
szokeasaurusrex
added a commit
that referenced
this pull request
Jul 28, 2025
This reverts commit 5709b25.
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.
Currently this thread will wait for
sleep(self.flush_interval)to end beforechecking
self._running. We can do better by using an Event.Now it will wait for
self.flush_intervalor untilself.__shutdown_requestedis set, whichever is shorter.