Is there a reason that https://github.com/googleapis/python-pubsub/blob/master/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py#L493 calls self.ack_histogram.percentile(99) directly rather than using https://github.com/googleapis/python-pubsub/blob/master/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py#L225 which is what the Leaser thread uses for how long it sleeps between updates?
I think this is causing a bug where the the average message time decrease and so the 99th percentile decreases quicker than the "sticky" ack_deadline method. The initial ack_deadline is then shorter than the time between Leaser refreshes and the messages expire before the lease is renewed.
Is there a reason that https://github.com/googleapis/python-pubsub/blob/master/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py#L493 calls
self.ack_histogram.percentile(99)directly rather than using https://github.com/googleapis/python-pubsub/blob/master/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py#L225 which is what the Leaser thread uses for how long it sleeps between updates?I think this is causing a bug where the the average message time decrease and so the 99th percentile decreases quicker than the "sticky"
ack_deadlinemethod. The initial ack_deadline is then shorter than the time between Leaser refreshes and the messages expire before the lease is renewed.