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

Fix concurrent span reusable data marshaler #7041

Conversation

jack-berg
Copy link
Member

Supersedes #7027.

Fixes #7019.

Mahoney and others added 2 commits January 16, 2025 14:39
ArrayDeque specifies that:

> Array deques ... are not thread-safe; in the absence of external
> synchronization, they do not support concurrent access by multiple
> threads.

`marshalerPool` is concurrently added to by the OkHttp threadpool
without synchronization, along with all threads that end spans (with
synchronisation in `SimpleSpanProcessor.exportLock`, which is not used
to synchronize with the OkHttp threadpool).

Just making the ArrayQueue synchronous internally removes all need to
worry about upstream locks.

Fixes open-telemetry#7019
@jack-berg jack-berg requested a review from a team as a code owner January 24, 2025 20:18
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.89%. Comparing base (c8da020) to head (784a4a6).
Report is 14 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7041      +/-   ##
============================================
- Coverage     89.95%   89.89%   -0.06%     
- Complexity     6636     6655      +19     
============================================
  Files           745      748       +3     
  Lines         20010    20077      +67     
  Branches       1962     1969       +7     
============================================
+ Hits          17999    18048      +49     
- Misses         1415     1435      +20     
+ Partials        596      594       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jack-berg jack-berg merged commit cd3b0e7 into open-telemetry:main Jan 24, 2025
25 checks passed
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.

ArrayIndexOutOfBoundsException in ArrayDeque.add in GrpcExporter
3 participants