Skip to content

Commit f5667c4

Browse files
author
Christian Hergert
committed
collection: ensure batchSize is passed to mongoc_cursor_t.
This will allow GETMORE calls to also propagate the proper batch_size.
1 parent d95bbdc commit f5667c4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/mongoc/mongoc-collection.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ mongoc_collection_aggregate (mongoc_collection_t *collection, /* IN */
272272
uint32_t hint;
273273
bson_t command;
274274
bson_t child;
275-
int32_t batch_size;
275+
int32_t batch_size = 0;
276276
bool did_batch_size = false;
277277

278278
bson_return_val_if_fail (collection, NULL);
@@ -333,8 +333,9 @@ mongoc_collection_aggregate (mongoc_collection_t *collection, /* IN */
333333
bson_append_document_end (&command, &child);
334334
}
335335

336-
cursor = mongoc_collection_command (collection, flags, 0, 0, 0, &command,
337-
NULL, read_prefs);
336+
cursor = mongoc_collection_command (collection, flags, 0, 0, batch_size,
337+
&command, NULL, read_prefs);
338+
338339
cursor->hint = hint;
339340

340341
if (max_wire_version > 0) {

0 commit comments

Comments
 (0)