-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
AbstractListenerReadPublisher publishing onComplete signal before onNext during heavy load #26834
Comments
@philsttr, from the logs it seems like after the switch to a non-container thread, reading begins right away and gets intertwined with perhaps the first
We're still in the
Meanwhile we have just called It seems odd but maybe the key here is that we are reading from a non-container thread and perhaps Tomcat has no way of knowing when we'll try to read again and therefore notifies us immediately on a container thread. @markt-asf can you confirm if this is expected behavior? If so then we'll need to fix this on our end to anticipate that an onAllDataRead can come in the |
Tomcat calls
Tomcat checks the above criteria at the following points:
|
Thanks for clarifying. So maybe what happens is:
I suppose the assumption is that during |
If the data is being read in a non-container thread then it is certainly possible that the non-container thread will read all of the data thereby triggering |
Okay thanks for confirming. I'll work on a fix. |
Thanks guys! I'll be happy to review and test the fix when it is available. |
@philsttr, there is a fix now in the 5.3.7-SNAPSHOT. You can give that a try. |
Tested and confirmed working. Thanks for the quick turnaround! You rock! |
Great! Thanks for confirming ahead of the release. |
I have a case where a WebFlux application needs to perform some blocking work. Therefore, I use
.subscribeOn(aBoundedElasticScheduler)
in the stream.When doing so, I've noticed that sometimes during heavy load, inbound requests are not fully read. After doing a lot of debugging, I believe I've narrowed it down to
AbstractListenerReadPublisher
publishing anonComplete
signal before anonNext
signal in some cases, leading to theonNext
signal being dropped.Example logging for a request that is not fully read, since
AbstractListenerReadPublisher
sends theonComplete
signal before theonNext
signal.For comparison, here is an example of a working request:
This is a pretty complex app, and I haven't tried to isolate it down into a small reproducible app (yet).
@rstoyanchev, I know you've been in this code a lot recently for another issue I filed (#26407). Do you have any ideas off of the top of your head before I dive in deeper?
The text was updated successfully, but these errors were encountered: