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

Wait jaeger receiver server goroutines exit on shutdown #2985

Merged

Conversation

pjanotti
Copy link
Contributor

The test hitting #2975 runs Start and Shutdown in close succession and in this case Shutdown was setting the field collectorServer to nil before the goroutine launched on Start actually accessed the field. Fixed the issue by adding a sync.WaitGroup to ensure that Shutdown actually waits for all launched goroutines to exit (also improved error handling for the server goroutines). Removed setting the fields to nil on Shutdown since that is not necessary.

Fixes #2975

@pjanotti pjanotti requested a review from a team April 22, 2021 05:28
@codecov
Copy link

codecov bot commented Apr 22, 2021

Codecov Report

Merging #2985 (db73e4c) into main (d10b842) will decrease coverage by 0.00%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2985      +/-   ##
==========================================
- Coverage   91.65%   91.64%   -0.01%     
==========================================
  Files         312      312              
  Lines       15427    15435       +8     
==========================================
+ Hits        14139    14145       +6     
- Misses        881      882       +1     
- Partials      407      408       +1     
Impacted Files Coverage Δ
receiver/jaegerreceiver/trace_receiver.go 73.55% <75.00%> (+0.05%) ⬆️

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 d10b842...db73e4c. Read the comment docs.

@bogdandrutu bogdandrutu merged commit d084963 into open-telemetry:main Apr 22, 2021
@pjanotti pjanotti deleted the fix-jaegerreceiver-shutdown branch April 22, 2021 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests are flaky
3 participants