Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Prevent a shutdown hook from being removed in JaegerTracer when a shutdown is in progress #689

Merged

Conversation

TomasHofman
Copy link
Contributor

@TomasHofman TomasHofman commented Feb 13, 2020

Prevent a shutdown hook from being removed in JaegerTracer when a shutdown is in progress

Signed-off-by: Tomas Hofman thofman@redhat.com

Which problem is this PR solving?

This is follow up PR for #679

The problem this PR is solving that when a JaegerTracer is closed as a result of shutdown, the attempt to remove its' close shutdown hook fails with IllegalStateException. I.e. the shutdown hook cannot be removed when shutdown is already in progress.

Short description of the changes

Do not remove a shutdown hook when a shutdown is already in progress.

@codecov
Copy link

codecov bot commented Feb 13, 2020

Codecov Report

Merging #689 into master will increase coverage by 0.38%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #689      +/-   ##
============================================
+ Coverage     89.46%   89.85%   +0.38%     
- Complexity      567      570       +3     
============================================
  Files            69       69              
  Lines          2089     2090       +1     
  Branches        267      267              
============================================
+ Hits           1869     1878       +9     
+ Misses          137      131       -6     
+ Partials         83       81       -2
Impacted Files Coverage Δ Complexity Δ
...n/java/io/jaegertracing/internal/JaegerTracer.java 89.07% <100%> (+1.06%) 27 <0> (+1) ⬆️
...gertracing/internal/reporters/LoggingReporter.java 90.9% <0%> (+9.09%) 5% <0%> (+1%) ⬆️
...rtracing/internal/reporters/CompositeReporter.java 100% <0%> (+28.57%) 7% <0%> (+1%) ⬆️

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 74adce4...d986b55. Read the comment docs.

…tdown is in progress

Signed-off-by: Tomas Hofman <thofman@redhat.com>
@TomasHofman TomasHofman changed the title Catch IllegalStateException during shutdown hook removal attempt... Prevent a shutdown hook from being removed in JaegerTracer when a shutdown is in progress Feb 13, 2020
@yurishkuro yurishkuro merged commit 8338be9 into jaegertracing:master Feb 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants