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
Drain waits indefinitely after request timeout on fetch #1009
base: main
Are you sure you want to change the base?
Conversation
Added a test to reproduce the issue. An easy, but hacky, way to solve it is to fully ignore However, What would be the right approach? |
Have implemented the latter approach, so overriding |
So I know how to fix the pull issue. In simplification, every pull request for the pull sub has an expiration. I need to track the expiration and if I don't get the proper status that closed the pull, I need to recognize that it has stalled. This will also help when a connection is broken and the simplification stalled. |
Revisiting this again, I'm tempted to close this. While it can technically be an issue, it will only happen if you'd have a @scottf, would you agree with closing this? |
This reverts commit 5e29697.
After some chat, @scottf and I agreed on leaving this open. |
(not sure if limited to the simplified API, but it can be reproduced with it)
Calling
drain(Duration.ZERO)
will wait indefinitely when a request timeout happened on a fetch.For this to happen the
fetch()
must be called, the request timeout status message must be received anddrain
must be called. Since the status message is counted in thelength
of theMessageQueue
, theisDrained()
will always returnfalse
.A workaround can be to always loop over the result and/or close the
FetchConsumer
manually.However, the expectation would be that
drain()
closes thisFetchConsumer
automatically, even if not manually closed.