Skip to content

Commit

Permalink
Run reactive MGET in parallel #2395 (#3036)
Browse files Browse the repository at this point in the history
  • Loading branch information
tishun authored Oct 30, 2024
1 parent a6dea9a commit 5b1b259
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public Flux<KeyValue<K, V>> mget(Iterable<K> keys) {
publishers.add(super.mget(entry.getValue()));
}

Flux<KeyValue<K, V>> fluxes = Flux.concat(publishers);
Flux<KeyValue<K, V>> fluxes = Flux.mergeSequential(publishers);

Mono<List<KeyValue<K, V>>> map = fluxes.collectList().map(vs -> {

Expand Down Expand Up @@ -333,7 +333,7 @@ public Mono<Long> mget(KeyValueStreamingChannel<K, V> channel, Iterable<K> keys)
publishers.add(super.mget(channel, entry.getValue()));
}

return Flux.merge(publishers).reduce((accu, next) -> accu + next);
return Flux.merge(publishers).reduce(Long::sum);
}

@Override
Expand Down

0 comments on commit 5b1b259

Please sign in to comment.