I'm using the RemoteAPI (Java) to go through a large dataset, ~90K entities, and perform some data migration.
int CHUNK_SIZE = 500;
int LIMIT = 900;
QueryResultList<Entity> result = ds.prepare(entityQuery)
.asQueryResultList(
FetchOptions.Builder
.withPrefetchSize(CHUNK_SIZE)
.limit(LIMIT)
.chunkSize(CHUNK_SIZE)
).startCursor(cursor);
With the query LIMIT
set to 900
the result.size()
is the entire dataset, ~90K, instead of 900
. If I try a lower LIMIT
, say 300
, the result size is the expected one (300
).
What am I missing here? From the documentation I couldn't figure out why it produces the behaviour I'm describing here.