File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -733,6 +733,12 @@ public ResponseEntity<Map<String, Object>> doc_load() {
733733 int effectiveWorkers = Math .min (ws .workers ,
734734 (int )((totalDocsToProcess + docsPerWorker - 1 ) / docsPerWorker )); // ceil division
735735
736+ // When ops_rate >> totalDocsToProcess, the ceil division above collapses to 1 even if
737+ // multiple workers were requested. Ensure we use at least min(ws.workers, totalDocsToProcess)
738+ // workers so concurrency-dependent tests (e.g. dedupe-disable) are not silently serialized.
739+ int minWorkers = (int ) Math .min (ws .workers , totalDocsToProcess );
740+ effectiveWorkers = Math .max (effectiveWorkers , minWorkers );
741+
736742 System .out .println ("Smart worker counting: Total docs=" + totalDocsToProcess +
737743 ", Docs per worker=" + docsPerWorker +
738744 ", Requested workers=" + ws .workers +
You can’t perform that action at this time.
0 commit comments