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

improves traceQueue cleaning logic #2241

Merged

Conversation

OlegDokuka
Copy link
Contributor

this commit improves logic on when the previous TraceContext has to be cleaned by looking at the last reader thread as well as the last polled value and trying to match it with the context that was available before. If the context was available when the previous reader is different from the current or when the previous value is null, the logic assumes that the thread offered value and then draining queue is the same, so there is no need to clear context after the last value is drained and that responsibility is on the reader.

Signed-off-by: Oleh Dokuka oleh.dokuka@icloud.com

this commit improves logic on when the previous TraceContext has to be cleaned by looking at the last reader thread as well as last polled value and tries to match it with the context that was available before. If context was available when the previous reader is different from the current or when the previous value is null, the logic assumes that the thread offered value and then draining queue is the same, so there is no need to clear context after the last value is drained and that responsibility is on the reader

Signed-off-by: Oleh Dokuka <oleh.dokuka@icloud.com>
@OlegDokuka OlegDokuka added this to the 3.1.6 milestone Jan 3, 2023
Signed-off-by: Oleh Dokuka <oleh.dokuka@icloud.com>
@marcingrzejszczak marcingrzejszczak merged commit 6a3612c into spring-cloud:3.1.x Jan 3, 2023
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.

None yet

2 participants