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

Flux.cache hangs indefinately in multi-batch flow scenarios (many request calls). #1921

Closed
a701440 opened this issue Oct 17, 2019 · 3 comments · Fixed by #2741
Closed

Flux.cache hangs indefinately in multi-batch flow scenarios (many request calls). #1921

a701440 opened this issue Oct 17, 2019 · 3 comments · Fixed by #2741
Milestone

Comments

@a701440
Copy link

a701440 commented Oct 17, 2019

@Test
public void testCacheWithMultipleBatches() {
    List<Integer> x = Flux.range(0, 1000).cache(5).toStream(10).collect(Collectors.toList());
}

This code hangs in version 3.3.0.RELEASE. Was not causing this problem in 3.2.2.RELEASE.
Looks like hanging is caused by cache, when cache is removed it succeeds. When toStream parameter is bumped to a large number so only one request is made it does not hang.

@a701440 a701440 changed the title cache causes hanging with multiple request calls and single subscriber. Flux.cache hangs indefinately in multi-batch flow scenarios (many request calls). Oct 22, 2019
@a701440
Copy link
Author

a701440 commented Nov 4, 2019

Not 100% sure, but this seems to be a side effect caused by the c5a66ba commit. FluxReplay does not seem to have any capability to make multiple "request" calls to it's own source. Only one call is made in "onSubscribe". If downstream is making multiple request calls to FluxReplay it does not propagate them properly upstream. @simonbasle

@simonbasle
Copy link
Member

we'll look into it, but it seems indeed to be a side effect of that change. the thing is, a complete revert is probably not appropriate, so I'll explore middle grounds (see #1948)

@a701440
Copy link
Author

a701440 commented Nov 7, 2019

It's weird, but I do not see any code that would handle multiple "request" calls in the FluxReplay. it looks like the class needs to be redesigned to handle that. The original before your change only worked because it was converting any initial limited request to the "unlimited" request to the source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants