Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publisher flow control can block forever if a large message exceeds the bytes limit all by itself #685

Closed
plamut opened this issue May 29, 2021 · 0 comments · Fixed by #847
Assignees
Labels
api: pubsub Issues related to the googleapis/java-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@plamut
Copy link

plamut commented May 29, 2021

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?

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/java-pubsub API. label May 29, 2021
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label May 31, 2021
@meredithslota meredithslota added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed triage me I really want to be triaged. labels Jun 2, 2021
@plamut plamut changed the title Publisher flow control can block forever if a large message exceed the bytes limit all by itself Publisher flow control can block forever if a large message exceeds the bytes limit all by itself Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/java-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants