Skip to content

Commit 954ecad

Browse files
author
DvirDukhan
committed
changed minbatch logic
1 parent dfaed79 commit 954ecad

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/background_workers.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,10 @@ static RedisAI_RunInfo **_BGThread_BatchOperations(RunQueueInfo *run_queue_info,
238238
// there's anything else to batch
239239
current_batchsize += next_batchsize;
240240

241-
// If minbatchsize hasn't been set, or if the current batch
242-
// size exceeds the minimum batch size already, then we're done.
241+
// If batch size exceeds the minimum batch size already, then we're done.
243242
// Otherwise, if minbatchsize was set and the size wasn't reached,
244243
// loop until there's something new on the queue
245-
if (minbatchsize == 0 || current_batchsize >= minbatchsize) {
244+
if (minbatchsize !=0 && current_batchsize >= minbatchsize) {
246245
break;
247246
}
248247

0 commit comments

Comments
 (0)