-
Notifications
You must be signed in to change notification settings - Fork 214
Closed
Labels
api: pubsubIssues related to the googleapis/python-pubsub API.Issues related to the googleapis/python-pubsub API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
It's currently random.uniform(0.0, ack_deadline * 0.9) here.
- We should probably have some minimum so it doesn't lease too frequently.
- The point of setting the max to
ack_deadline * 0.9is 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.
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the googleapis/python-pubsub API.Issues related to the googleapis/python-pubsub API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.