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

[exporter][batching][chore] record batch creation time #12752

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sfc-gh-sili
Copy link
Contributor

@sfc-gh-sili sfc-gh-sili commented Mar 27, 2025

Description

This PR

  • Records batch creation time
  • Checks batch timeout using the batch creation time instead of relying on timer reset.

Link to tracking issue

#12473

Testing

Documentation

@sfc-gh-sili sfc-gh-sili changed the title [exporter][batching] Replace timer with ticker [exporter][batching][chore Mar 27, 2025
@sfc-gh-sili sfc-gh-sili changed the title [exporter][batching][chore [exporter][batching][chore] record batch creation time Mar 27, 2025
@sfc-gh-sili sfc-gh-sili marked this pull request as ready for review March 27, 2025 22:03
@sfc-gh-sili sfc-gh-sili requested a review from a team as a code owner March 27, 2025 22:03
Copy link

codecov bot commented Mar 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.45%. Comparing base (c56d8f6) to head (4b42af5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12752      +/-   ##
==========================================
- Coverage   91.45%   91.45%   -0.01%     
==========================================
  Files         483      483              
  Lines       26605    26604       -1     
==========================================
- Hits        24332    24331       -1     
  Misses       1791     1791              
  Partials      482      482              

☔ 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.

Comment on lines +194 to +197
if !forceFlush && time.Since(qb.currentBatch.created) < qb.cfg.FlushTimeout {
qb.currentBatchMu.Unlock()
return
}
Copy link
Member

Choose a reason for hiding this comment

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

This mean that we no longer do flush every FlushTimeout, but somewhere between [FlushTimeout, 2*FlushTimeout]

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. Is changing to a Ticker needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see what you mean.
I was trying to use a single time keeper for all batches, but if we want to control the flush timeout more precisely, we could keep a separate timer for each batch instead

@github-actions github-actions bot requested a review from bogdandrutu March 28, 2025 22:20
@sfc-gh-sili sfc-gh-sili marked this pull request as draft March 29, 2025 00:52
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