Skip to content

Replace ArrayBlockingQueue with park/unpark for BatchSpanProcessor$Worker#8240

Open
Khepu wants to merge 4 commits intoopen-telemetry:mainfrom
Khepu:main
Open

Replace ArrayBlockingQueue with park/unpark for BatchSpanProcessor$Worker#8240
Khepu wants to merge 4 commits intoopen-telemetry:mainfrom
Khepu:main

Conversation

@Khepu
Copy link
Copy Markdown

@Khepu Khepu commented Apr 1, 2026

Browsing through the codebase I saw the ArrayBlockingQueue and thought I could do something better. Running benchmarks locally did produce better results though they weren't as consistent as I would have liked.

The same changes could also be applied to BatchLogRecordProcessor.

Khepu added 2 commits April 1, 2026 21:40
Bypassing all the complexity that comes with ABQ should come with improved performance
@Khepu Khepu requested a review from a team as a code owner April 1, 2026 19:47
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Apr 1, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.32%. Comparing base (c856c2b) to head (8970e4d).

Files with missing lines Patch % Lines
...telemetry/sdk/trace/export/BatchSpanProcessor.java 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8240      +/-   ##
============================================
- Coverage     90.32%   90.32%   -0.01%     
+ Complexity     7654     7653       -1     
============================================
  Files           843      843              
  Lines         23080    23076       -4     
  Branches       2312     2312              
============================================
- Hits          20848    20843       -5     
+ Misses         1516     1514       -2     
- Partials        716      719       +3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Making the worker extend thread was the only sensible way of having it keep a constant reference to its thread. Everything else I tried was quite hacky
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.

1 participant