-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Labels
api: pubsubIssues related to the googleapis/java-pubsub API.Issues related to the googleapis/java-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
After reviewing the related Ruby PR and comparing it to the similar Python and Java implementations, I think the Java implementation is missing a corner case.
Suppose the publisher flow controller's byteLimit is set to 1000 bytes, and the desired behavior to Block. If a message larger than that arrives (say, 1200 bytes), it would block forever, because it would just reserve the maximum available capacity, but that would still not be enough to let it through. It would also cause all other messages to get stuck behind.
From what I can see, there's no check if a message would actually need to reserve more than byteLimit to get through?
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the googleapis/java-pubsub API.Issues related to the googleapis/java-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.