-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix - TODO remove redundant sanitize call from queue #7443
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
Conversation
Signed-off-by: anmol7344 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7443 +/- ##
==========================================
- Coverage 96.44% 96.44% -0.01%
==========================================
Files 377 377
Lines 23092 23094 +2
==========================================
+ Hits 22271 22272 +1
- Misses 622 623 +1
Partials 199 199
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: anmol7344 <[email protected]>
Signed-off-by: anmol7344 <[email protected]>
if batch.GetSpanFormat() == processor.JaegerSpanFormat { | ||
sp.sanitizer(mSpan) | ||
} |
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.
Race condition introduced by moving sanitizer call before enqueueSpan. The sanitizer modifies the span object, but the comment at line 316 explicitly states 'spans may share the Process object, so no changes should be made to Process in this function as it may cause race conditions.' The sanitizer can modify Process.Tags, creating a race condition when multiple spans share the same Process object. The original code correctly sanitized spans after dequeuing to avoid this race condition.
if batch.GetSpanFormat() == processor.JaegerSpanFormat { | |
sp.sanitizer(mSpan) | |
} | |
// The sanitizer will be applied when the span is dequeued |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
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.
this change fails the unit test TestSpanProcessorErrors
in span_processor_test.go
@yurishkuro |
collector is v1 code that has 4 month of life left. I don't want to change it. |
Oh! |
otel collector |
will ingester remain a separate binary in Jaeger v2 or will be folded into otel collector? |
V2 is a single binary that can be deployed in multiple roles |
Which problem is this PR solving?
Description of the changes
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test