Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ryzhyk
Copy link
Contributor

@ryzhyk ryzhyk commented Jan 19, 2026

Fixes #5464

A recent change introduced a corner case where an empty batch was pushed to the queue, but the queued batch counter was not updated, leading to an underflow when dequeuing the batch.

A recent change introduced a corner case where an empty batch was pushed to the
queue, but the queued batch counter was not updated, leading to an underflow
when dequeing the batch.

Signed-off-by: Leonid Ryzhyk <[email protected]>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where an empty batch was pushed to an endpoint queue without updating the queued batch counter, which could cause an underflow when dequeuing. The fix adds a call to enqueue_batch with a size of 0 to properly track the queued batch.

Changes:

  • Added missing enqueue_batch call for empty batches created during transactions to prevent counter underflow

@gz gz added this pull request to the merge queue Jan 19, 2026
Merged via the queue into main with commit 3c7490a Jan 20, 2026
7 checks passed
@gz gz deleted the issue5464 branch January 20, 2026 00:19
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.

underflow of queued_batches when enabling change stream

4 participants