Skip to content

Reconsider calculation of time between leaser runs #675

@pradn

Description

@pradn

It's currently random.uniform(0.0, ack_deadline * 0.9) here.

  1. We should probably have some minimum so it doesn't lease too frequently.
  2. The point of setting the max to 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.

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the googleapis/python-pubsub API.priority: p2Moderately-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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions