googleapis / googleapis/google-cloud-python
Make initial modack asynchronous
- 主要语言
- Python
- 星标
- 5.4k
- 派生
- 1.8k
- 平均合并
- 3 天 4 小时
- 30 天内合并 PR
- 122
描述
See [this bug in the issue tracker](https://issuetracker.google.com/issues/329314022) for context. The initial modack is [initiated synchronously](https://github.com/googleapis/python-pubsub/blob/main/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py#L1101-L1104) upon receiving a message. In contrast, Java [queues them to happen asynchronously](https://github.com/googleapis/java-pubsub/blob/20099510c647bd8292711976d6eaeceef98bbed8/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java#L417). This appears to have some performance implications. We should instead queue these up to happen asynchronously, though we need to ensure we execute them relatively soon. Right now, they could happen as late as [90% of the ack deadline](https://github.com/googleapis/python-pubsub/blob/2b35e6557e16885ea8e6d4695b8dd3f3bd960eab/google/cloud/pubsub_v1/subscriber/_protocol/leaser.py#L230-L232).
贡献指南
评估
这个 Issue 还没有评估数据。