Skip to content

Commit

Permalink
fixed that "async" parallelism must be power of two - so don't use "m…
Browse files Browse the repository at this point in the history
…axBulkSize" for that

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle committed Mar 10, 2022
1 parent a7af56e commit c707120
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public Flow<SubSource<AbstractWriteModel, NotUsed>, WriteResultAndErrors, NotUse
.flatMapConcat(searchUpdateMapper::processWriteModels)
.flatMapMerge(parallelism, writeModels -> executeBulkWrite(shouldAcknowledge, writeModels))
.mergeSubstreamsWithParallelism(maxBulkSize)
.async(MongoSearchUpdaterFlow.DISPATCHER_NAME, Math.max(parallelism, maxBulkSize))
.async(MongoSearchUpdaterFlow.DISPATCHER_NAME, parallelism)
);
}

Expand Down

0 comments on commit c707120

Please sign in to comment.