-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
FluxBuffer
hangs when buffer Supplier returns a Set
#3821
Comments
Sage-Pierce
pushed a commit
to Sage-Pierce/reactor-core
that referenced
this issue
Jun 1, 2024
Sage-Pierce
pushed a commit
to Sage-Pierce/reactor-core
that referenced
this issue
Jun 19, 2024
Sage-Pierce
pushed a commit
to Sage-Pierce/reactor-core
that referenced
this issue
Jun 22, 2024
- Make `Collection` behavior consistent among all FluxBuffer* operators - Added several more tests for all FluxBuffer* operators covering usage of `Set`
Sage-Pierce
pushed a commit
to Sage-Pierce/reactor-core
that referenced
this issue
Jun 22, 2024
- Make `Collection` behavior consistent among all FluxBuffer* operators - Added several more tests for all FluxBuffer* operators covering usage of `Set`
Sage-Pierce
pushed a commit
to Sage-Pierce/reactor-core
that referenced
this issue
Jun 24, 2024
Sage-Pierce
pushed a commit
to Sage-Pierce/reactor-core
that referenced
this issue
Jun 24, 2024
Sage-Pierce
pushed a commit
to Sage-Pierce/reactor-core
that referenced
this issue
Jun 24, 2024
- Make `Collection` behavior consistent among all FluxBuffer* operators - Added several more tests for all FluxBuffer* operators covering usage of `Set`
Sage-Pierce
pushed a commit
to Sage-Pierce/reactor-core
that referenced
this issue
Jun 24, 2024
Sage-Pierce
pushed a commit
to Sage-Pierce/reactor-core
that referenced
this issue
Jun 24, 2024
…ators that take a `bufferSupplier`
Sage-Pierce
pushed a commit
to Sage-Pierce/reactor-core
that referenced
this issue
Jun 24, 2024
…ators that take a `bufferSupplier`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If
Flux.buffer(int maxSize, Supplier<Collection> bufferSupplier)
is invoked where thebufferSupplier
returns a Set, the stream may hang on duplicate upstream emissions and bounded downstream request.Extra Context
I have a use case where I'd like to process batches of
n
distinct elements from a source at a time, and usingFlux.buffer(n, LinkedHashSet::new)
would be a convenient, concise way to do so.Expected Behavior
The stream should not hang and should complete successfully
Actual Behavior
The stream hangs and never completes
Steps to Reproduce
This test will fail
If the test is changed to not contain duplicates, i.e.
Flux.just(1, 2)
, the test passes.Possible Solution
FluxBuffer
ignores whether adding to the buffer actually has any effect on the buffer. If adding to the buffer doesn't modify it, an extras.request(1)
should be issued.Your Environment
netty
, ...): N/Ajava -version
): 17.0.8uname -a
): MacOS Darwin 23.5.0The text was updated successfully, but these errors were encountered: