-
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
ArrayIndexOutOfBoundsException when using ParallelFlux #1293
Comments
🤦♂️ oh god yeah, that can't work... |
Yes on Spring Sleuth. Reducing using ParallelFlux.reduce(). Something similar to: Flux.concat(tasks)
.parallel(numRails)
.runOn(scheduler)
.reduce(HashMap::new, (map, value) -> {
map.put(value, value);
return map;
})
.reduce((a, b) -> {
a.putAll(b);
return a;
}) |
as a possible workaround, can you try to append |
Didn't seem to change anything. Also tried adding hide() at other places, too. |
Ah yeah the |
We recently updated from 3.1.7 to 3.1.8 and code that was previously working now fails with an exception:
Looking at the code for ParallelLiftFuseable.java:74, I see:
Seems like
i
will always be0
in the first iteration, thuss[i - 1]
will always bes[-1]
and throw an exception every time.Steps to reproduce
Where this is failing is a somewhat complex parallel/reduce operation. I'm trying to come up with a simple example to demonstrate, but not having any luck. However, looking at the above code, it's hard to see how this class could ever work.
Reactor Core version
Started failing in 3.1.8. Previous version (3.1.7) works fine.
JVM version (e.g.
java -version
)JRE is 10.0.2, but compile target 1.8.
The text was updated successfully, but these errors were encountered: