Skip to content

Improve subscriber lease extension logic #5048

@dbolduc

Description

@dbolduc

The current implementation is to extend all leases every N seconds. It is an ok strategy. The customers aren't charged for these RPCs. It could be a lot better though, and has potential to clog the lease event loop before we have #3975.

We should:

  • keep in the LeaseInfo the last time we attempted to extend a lease. (or None, for new messages).
  • only extend leases for messages where 80% of the current lease has been used.

This looks like modifying the Leases::retain functions. And probably updating MessageStream / LeaseState tests that assume a certain behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: pubsubIssues related to the Pub/Sub API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions