Skip to content

[SDK] BatchLogRecordProcessor::ForceFlush is not waking up bg thread #3448

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

Merged

Conversation

KJTsanaktsidis
Copy link
Contributor

Calling BatchLogRecordProcessor::ForceFlush was not waking up the background to actually perform the flush. So, this was simply sleeping on the condvar for the entire timeout, and then returning false without ever flushing anything.

I probably should put together a test for this - I'll try and find some time early next week to do that.

@KJTsanaktsidis KJTsanaktsidis requested a review from a team as a code owner May 29, 2025 12:49
Copy link

linux-foundation-easycla bot commented May 29, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: KJTsanaktsidis / name: KJ Tsanaktsidis (a2f5680)

Copy link

netlify bot commented May 29, 2025

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
🔨 Latest commit a2f5680
🔍 Latest deploy log https://app.netlify.com/projects/opentelemetry-cpp-api-docs/deploys/684b56f7e116040008574ec9

@KJTsanaktsidis
Copy link
Contributor Author

Ah CLA's... poking our legal people about this now.

@marcalff marcalff added the pr:waiting-on-cla Waiting on CLA label May 29, 2025
Copy link

codecov bot commented May 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.91%. Comparing base (3b7f564) to head (a2f5680).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3448      +/-   ##
==========================================
- Coverage   89.92%   89.91%   -0.01%     
==========================================
  Files         219      219              
  Lines        7041     7042       +1     
==========================================
  Hits         6331     6331              
- Misses        710      711       +1     
Files with missing lines Coverage Δ
sdk/src/logs/batch_log_record_processor.cc 83.12% <100.00%> (+0.12%) ⬆️

... and 1 file with indirect coverage changes

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

Copy link
Member

@owent owent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after the format and CLA problems are solved.

@KJTsanaktsidis
Copy link
Contributor Author

I'm sorry, I'm still waiting for our legal folk to approve the CLA...

This fix is totally trivial and has zero creative expression behind it, so I doubt it's actually copyrightable if somebody else wants to submit it independently. Otherwise, please stand by :(

@marcalff
Copy link
Member

marcalff commented Jun 7, 2025

I'm sorry, I'm still waiting for our legal folk to approve the CLA...

This fix is totally trivial and has zero creative expression behind it, so I doubt it's actually copyrightable if somebody else wants to submit it independently. Otherwise, please stand by :(

Waiting for CLA, we know this takes time.

@KJTsanaktsidis The fix itself looks correct, and you were able to investigate and fix a multi threaded related issue in the opentelemetry-cpp code base, so you definitively have the skills it takes here.

On the bright side, once CLA is resolved, the next contribution(s) will be much easier to process, should you find more ;-)

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending CLA and minor format.

@marcalff
Copy link
Member

/easycla

@KJTsanaktsidis KJTsanaktsidis force-pushed the kjtsanaktsidis/fix_hang branch from 7c9cb59 to a2f5680 Compare June 12, 2025 22:38
@KJTsanaktsidis
Copy link
Contributor Author

@marcalff OK CLA is signed and formatting is fixed 🎉 should be good to go now.

@marcalff marcalff removed the pr:waiting-on-cla Waiting on CLA label Jun 13, 2025
@marcalff marcalff changed the title fix: BatchLogRecordProcessor::ForceFlush is not waking up bg thread [SDK] BatchLogRecordProcessor::ForceFlush is not waking up bg thread Jun 13, 2025
@marcalff marcalff merged commit 47f530a into open-telemetry:main Jun 13, 2025
67 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.

3 participants