-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Description
Version of MarkLogic Java Client API
v5.0.1
Version of MarkLogic Server
v10.0-2.1
Java version
openjdk version "11.0.3" 2019-04-16
OS and version
ProductName: Mac OS X
ProductVersion: 10.15.3
BuildVersion: 19D76
Input:
QueryBatcher queryBatcher = moveMgr.newQueryBatcher(rcQueryDef)
.withBatchSize(100)
.withThreadCount(1)
.onUrisReady(batch -> {
System.out.println("=======>" + batch.getItems().length);
})
.onQueryFailure(Throwable::printStackTrace);
queryBatcher.setMaxBatches(1);
moveMgr.startJob(queryBatcher);
queryBatcher.awaitCompletion();
Actual output:
2020-02-28 10:57:38.516 [task-1] INFO c.m.c.d.impl.QueryBatcherImpl - Starting job batchSize=100, threadCount=1, onUrisReady listeners=2, failure listeners=4
=======>100
=======>100
=======>100
2020-02-28 10:57:38.555 [task-1] INFO c.m.c.d.impl.QueryBatcherImpl - Job complete, jobBatchNumber=3, jobResultsSoFar=300
Expected output:
The setup has
batch size = 100
thread count = 1
max batches = 1
number of forests = 3
Based on the thread count of 1 the querybatcher should only pull 100 docs.
Currently, it's pulling 300 items i.e. 100 items per forest even though the thread count is set to 1.