-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pubsub): fix messages delivered multiple times despite a long ACK…
… deadline (#9525) * fix(pubsub): lease-manage all received messages This is to prevent the messages that are put on hold from unnecessarily timing out too soon, causing the backend to re-send them. * Exclude on hold messages from load calculation Even the messages received that exceed the maximum load (as defined by flow control) must be lease-mananged to avoid unnecessary ACK deadline expirations, but since they are not dispatched (yet) to user callbacks, they should not contribute to the overall load. Without this change, the total load could be overestimated, resulting in an indefinitely paused message stream, and messages not being dispatched to callbacks when they should be. * Use histogram to set default stream ACK deadline With all the messages lease-managed (even those on hold), there is no need to have a fixed default value. * Add warning if internal bytes count is negative This should not happen, but if it does, it is a bug in the StreamingPullManager logic, and we should know about it.
- Loading branch information
Showing
3 changed files
with
112 additions
and
80 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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