-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[exporter/loadbalancing] Do not block resolver by the exporter shutdown #31602
[exporter/loadbalancing] Do not block resolver by the exporter shutdown #31602
Conversation
903b520
to
38aca5c
Compare
38aca5c
to
679949f
Compare
exp := lb.exporters[existing] | ||
// Shutdown the exporter asynchronously to avoid blocking the resolver | ||
go func() { | ||
_ = exp.Shutdown(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK with this, but isn't it cleaner to use context.WithTimeout
wrapping the context? Would Shutdown respect the timeout?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what's the need for this. With all the locks this shutdown can block consumes which supposed to be handled by other available sub-exporters. If we kill it by timeout, we introduce the same panics back. I think we should mark the sub-exporter as "turned off" and shut it down asynchronously once it handles all the current requests.
Merging it as is since I believe it's an important fix based on the feedback #31410. I'm happy to address any other feedback as a follow-up |
…wn (open-telemetry#31602) This resolves the issues seen in open-telemetry#31410 after merging open-telemetry#31456
…wn (open-telemetry#31602) This resolves the issues seen in open-telemetry#31410 after merging open-telemetry#31456
This resolves the issues seen in #31410 after merging #31456