googleapis / googleapis/google-cloud-python
Make initial modack asynchronous
- Lenguaje dominante
- Python
- Estrellas
- 5.4k
- Forks
- 1.8k
- Merge medio
- 3 d 4 h
- PR fusionados (30 d)
- 122
Descripción
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).
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.