Skip to content

Conversation

@agarakan
Copy link
Contributor

@agarakan agarakan commented Dec 31, 2025

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 halted to true.
When bool halted is true, the queue waits for halted to 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 halted to 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

make lint
make fmt
make fmt-sh
make test

Requirements

Before commiting your code, please do the following steps.

  1. Run make fmt and make fmt-sh
  2. Run make lint

Integration Tests

To run integration tests against this PR, add the ready for testing label.

@agarakan agarakan requested a review from a team as a code owner December 31, 2025 00:52
// 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
Copy link
Contributor

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?

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

This PR was marked stale due to lack of activity.

@github-actions github-actions bot added the Stale label Jan 8, 2026
@agarakan agarakan force-pushed the instantiate-retry-heap branch from 02bc5c6 to e156917 Compare January 16, 2026 18:38
@github-actions github-actions bot removed the Stale label Jan 17, 2026
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