generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 244
Implement halt on target logic #1975
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
agarakan
wants to merge
14
commits into
instantiate-retry-heap
Choose a base branch
from
sender-block-on-failure
base: instantiate-retry-heap
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sky333999
reviewed
Jan 1, 2026
| // onSuccessCallback returns a callback function to be executed after a successful send. | ||
| func (q *queue) onSuccessCallback(bufferedSize int) func() { | ||
| return func() { | ||
| q.resume() // Resume queue on success |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Say a bad batch from a target caused this to halt. Now that bad batch is re-tried for 14 days and eventually dropped - but this never gets resumed in that case right? So this target is blocked forever in that scenario?
Contributor
|
This PR was marked stale due to lack of activity. |
02bc5c6 to
e156917
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the issue
Implements halt on a target when Sender calls fail() and resumes reading from target when Sender calls done()
Description of changes
Workflow:
When Sender detects request failure, the batch.fail() is invoked, which in turn invokes the fail callback to set
bool haltedto true.When
bool haltedis true, the queue waits forhaltedto become false before sending the next batch to the SenderPool tasks queue.When Sender detects request success, the batch.done() is invoked, which in turn invokes the done callaback setting
bool haltedto false.License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
All unit tests passing
Requirements
Before commiting your code, please do the following steps.
make fmtandmake fmt-shmake lintIntegration Tests
To run integration tests against this PR, add the
ready for testinglabel.