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

Add capability for memory and persistent queue to block when add items #12074

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

Conversation

bogdandrutu
Copy link
Member

@bogdandrutu bogdandrutu commented Jan 11, 2025

This functionality is not yet exposed to the user because there is no config available. One option to consider is to add a "blocking" bool in the queue config.

Link to tracking issue

#8122
#10368

@bogdandrutu bogdandrutu force-pushed the add-blocking branch 2 times, most recently from 07509db to f66fc54 Compare January 11, 2025 04:59
@bogdandrutu bogdandrutu changed the title Add blocking Add capability for memory and persistent queue to block when add items Jan 11, 2025
@bogdandrutu bogdandrutu marked this pull request as ready for review January 11, 2025 05:03
@bogdandrutu bogdandrutu requested a review from a team as a code owner January 11, 2025 05:03
@bogdandrutu bogdandrutu requested a review from atoulme January 11, 2025 05:03
@bogdandrutu bogdandrutu force-pushed the add-blocking branch 9 times, most recently from 6be2329 to e5ca0d6 Compare January 11, 2025 18:19
Copy link

codecov bot commented Jan 11, 2025

Codecov Report

Attention: Patch coverage is 78.57143% with 18 lines in your changes missing coverage. Please review.

Project coverage is 91.62%. Comparing base (7f4664e) to head (a4b96ca).

Files with missing lines Patch % Lines
exporter/exporterqueue/cond.go 61.29% 12 Missing ⚠️
exporter/exporterqueue/persistent_queue.go 90.32% 2 Missing and 1 partial ⚠️
exporter/exporterqueue/sized_queue.go 85.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12074      +/-   ##
==========================================
- Coverage   91.68%   91.62%   -0.06%     
==========================================
  Files         455      456       +1     
  Lines       24039    24086      +47     
==========================================
+ Hits        22039    22068      +29     
- Misses       1629     1645      +16     
- Partials      371      373       +2     

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

sq.hasElements.Wait()
// TODO: Change the Queue interface to return an error to allow distinguish between shutdown and context canceled.
// Ok to ignore the error, since the context.Background() will never be done.
_ = sq.hasMoreElements.Wait(context.Background())
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to switch hasMoreElements to the custom cond to resolve the TODO later?

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.

2 participants