Reconsider calculation of time between leaser runs #675
Labels
api: pubsub
Issues related to the googleapis/python-pubsub API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
It's currently
random.uniform(0.0, ack_deadline * 0.9)
here.ack_deadline * 0.9
is to leave enough wiggle room so the lease requests can be sent and processed by the server before the previous leases expire. We should probably make sure this time allotted to request-sending/server-processing to be some reasonable minimum (like 50 ms). No point in leaving wiggle room if the acks are going to expire by the time the new lease modacks arrive at the server.This came up in the review of #662.
The text was updated successfully, but these errors were encountered: