fix: ACK deadline set for received messages can be too low by plamut · Pull Request #416 · googleapis/python-pubsub
When a message is received, the initial MODACK value used should be the same value currently used by leaser. This makes sure the leaser will wake up and extend the ACK deadline before the initial one expires.
requested a review
from a team
google-cla
bot
added
the
cla: yes
label
May 21, 2021If flow_control.max_duration_per_lease_extension is set to too low a value, it is adjusted to the minimum ACK deadline.
plamut
added
the
do not merge
label
May 21, 2021The ACK deadline is dynamically being adjusted based on ACK data, but an updated deadline value must not be used for the new messages that arrive while the leaser thread is still sleeping. Doing so could result in the messages' ACK deadlines expiring before the leaser wakes up and has a chance of extending the deadlines for these messages. An updated ACK deadline value for new messages is thus only used when the leaser starts using it, too.
plamut
removed
the
do not merge
label
May 21, 2021
Merge the pull request once unit tests and other checks pass.
label
May 26, 2021This 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