Skip to content

Add exited status to SessionFlusher and rescue ThreadError#1851

Merged
st0012 merged 5 commits intomasterfrom
neel/fix-puma-session-flusher
Jul 25, 2022
Merged

Add exited status to SessionFlusher and rescue ThreadError#1851
st0012 merged 5 commits intomasterfrom
neel/fix-puma-session-flusher

Conversation

@sl0thentr0py
Copy link
Copy Markdown
Member

If we are unable to create a Thread, the underlying process is probably in an aborting state, so just gracefully stop trying to do session logic.
Additionally, if we call session_flusher.kill, we don't want to run session logic from then on.

fixes #1848

@sl0thentr0py sl0thentr0py requested a review from st0012 July 22, 2022 12:06
@sl0thentr0py sl0thentr0py marked this pull request as ready for review July 22, 2022 12:06
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #1851 (1092411) into master (e55cbf1) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1851      +/-   ##
==========================================
+ Coverage   98.38%   98.40%   +0.01%     
==========================================
  Files         146      146              
  Lines        8744     8773      +29     
==========================================
+ Hits         8603     8633      +30     
+ Misses        141      140       -1     
Impacted Files Coverage Δ
sentry-ruby/lib/sentry/session_flusher.rb 98.03% <100.00%> (+0.21%) ⬆️
sentry-ruby/spec/sentry/session_flusher_spec.rb 100.00% <100.00%> (ø)
sentry-resque/lib/sentry/resque.rb 100.00% <0.00%> (+2.85%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e55cbf1...1092411. Read the comment docs.

@sl0thentr0py sl0thentr0py requested a review from st0012 July 25, 2022 13:31
@st0012 st0012 merged commit b30722e into master Jul 25, 2022
@st0012 st0012 deleted the neel/fix-puma-session-flusher branch July 25, 2022 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sentry::SessionFlusher causes ThreadError and delay shutdown of puma worker

3 participants