Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exited status to SessionFlusher and rescue ThreadError #1851

Merged
merged 5 commits into from
Jul 25, 2022

Conversation

sl0thentr0py
Copy link
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

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.

@st0012 st0012 added this to In progress in 5.x via automation Jul 23, 2022
@st0012 st0012 added this to the 5.4.0 milestone Jul 23, 2022
@sl0thentr0py sl0thentr0py requested a review from st0012 July 25, 2022 13:31
@st0012 st0012 merged commit b30722e into master Jul 25, 2022
5.x automation moved this from In progress to Done 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
5.x
Done
Development

Successfully merging this pull request may close these issues.

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