Skip to content

Commit 146a86e

Browse files
author
DvirDukhan
committed
fixed PR comment
1 parent dfb1d18 commit 146a86e

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/background_workers.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,6 @@ static RedisAI_RunInfo **_BGThread_BatchOperations(RunQueueInfo *run_queue_info,
238238
continue;
239239
}
240240

241-
// If the new batch size would exceed the prescribed batch
242-
// size, then quit searching.
243-
// Here we could consider searching further down the queue.
244-
if (current_batchsize + next_batchsize > batchsize) {
245-
break;
246-
}
247-
248241
// If all previous checks pass, then keep track of the item
249242
// in the list of evicted items
250243
queueItem *tmp = queueNext(next_item);
@@ -257,10 +250,10 @@ static RedisAI_RunInfo **_BGThread_BatchOperations(RunQueueInfo *run_queue_info,
257250
// there's anything else to batch
258251
current_batchsize += next_batchsize;
259252

260-
// If batch size exceeds the minimum batch size already, then we're done.
261-
// Otherwise, if minbatchsize was set and the size wasn't reached,
262-
// loop until there's something new on the queue
263-
if (minbatchsize != 0 && current_batchsize >= minbatchsize) {
253+
// If the new batch size would exceed the prescribed batch
254+
// size, then quit searching.
255+
// Here we could consider searching further down the queue.
256+
if (current_batchsize >= batchsize) {
264257
break;
265258
}
266259

0 commit comments

Comments
 (0)