Skip to content

[refactor] Migrate persistent queue to consolidated metadata format #13126

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

malus2077
Copy link
Contributor

This PR updates the persistence strategy to consolidate all relevant queue information (start, stop, in-progress, size) under a single key for each write operation.

Copy link

codecov bot commented Jun 2, 2025

Codecov Report

Attention: Patch coverage is 75.53957% with 34 lines in your changes missing coverage. Please review.

Project coverage is 91.26%. Comparing base (d800ad3) to head (f5bded2).

Files with missing lines Patch % Lines
...rterhelper/internal/queuebatch/persistent_queue.go 75.36% 22 Missing and 12 partials ⚠️

❌ Your patch check has failed because the patch coverage (75.53%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13126      +/-   ##
==========================================
- Coverage   91.28%   91.26%   -0.03%     
==========================================
  Files         510      510              
  Lines       28725    28812      +87     
==========================================
+ Hits        26223    26295      +72     
- Misses       1988     1991       +3     
- Partials      514      526      +12     

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

@bogdandrutu
Copy link
Member

Please use changes from #13125

@bogdandrutu
Copy link
Member

Hey… something is wrong here

@malus2077 malus2077 force-pushed the malus2077/refactor-12890 branch from 250d434 to 4aa8773 Compare June 3, 2025 13:13
@malus2077
Copy link
Contributor Author

Hey… something is wrong here

It's done! Apologies, I'm still getting comfortable with git rebase operations.

@github-actions github-actions bot requested a review from bogdandrutu June 4, 2025 12:21
github-merge-queue bot pushed a commit that referenced this pull request Jun 4, 2025
Embed QueueMetadata directly into persistentQueue, replacing the
scattered metadata fields.

1. Add QueueMetadata as a member of persistentQueue.
2. Delete redundant fields (queueSize, readIdx, writeIdx, …).

Relates to #13126
@bogdandrutu
Copy link
Member

Please rebase with latest changes

@malus2077 malus2077 requested a review from codeboten as a code owner June 5, 2025 00:47
malus2077 added a commit to malus2077/opentelemetry-collector that referenced this pull request Jun 5, 2025
…ry#13140)

Embed QueueMetadata directly into persistentQueue, replacing the
scattered metadata fields.

1. Add QueueMetadata as a member of persistentQueue.
2. Delete redundant fields (queueSize, readIdx, writeIdx, …).

Relates to open-telemetry#13126
@malus2077 malus2077 force-pushed the malus2077/refactor-12890 branch from 7d0eef9 to 1acbafc Compare June 5, 2025 01:59
@malus2077 malus2077 changed the title refactor: migrate persistent queue to consolidated metadata format [chore] Migrate persistent queue to consolidated metadata format Jun 5, 2025
@malus2077 malus2077 changed the title [chore] Migrate persistent queue to consolidated metadata format [refactor] Migrate persistent queue to consolidated metadata format Jun 5, 2025
return err
}

if metadataSizerType != pq.set.sizerType {
Copy link
Member

Choose a reason for hiding this comment

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

Let's add support for this in a followup PR, for the moment in this case return error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not returning an error directly here for now. Please see my previous comment.

@github-actions github-actions bot requested a review from bogdandrutu June 6, 2025 12:27
@malus2077
Copy link
Contributor Author

Thanks for the review, @bogdandrutu! Changes are ready.

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.

[exporterhelper] Refactor persistent storage size backup
2 participants