-
Notifications
You must be signed in to change notification settings - Fork 214
Closed
Labels
api: pubsubIssues related to the googleapis/python-pubsub API.Issues related to the googleapis/python-pubsub API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-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.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Steps to reproduce
- Ack the same message multiple times on a streaming pull subscription.
This assertion fails when ack duplication occurs:
python-pubsub/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py
Line 588 in 20d661c
| assert len(ack_ids) == len(ack_reqs_dict) |
There is no de-duplication of acks in the dispatcher, and because ack_reqs_dict is a Dict[str, AckRequest], the latest AckRequest will replace an earlier request.
The solution is either to change ack_req_dict to allow for multiple AckRequests for the same message, or to de-duplicate acks in the dispatcher.
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the googleapis/python-pubsub API.Issues related to the googleapis/python-pubsub API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-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.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.