Skip to content

Commit c9e7591

Browse files
committed
CDRIVER-735 aggregate shouldn't override default batchSize
1 parent 79ad44f commit c9e7591

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/mongoc/mongoc-collection.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ mongoc_collection_aggregate (mongoc_collection_t *collection, /* IN */
229229
bson_t command;
230230
bson_t child;
231231
int32_t batch_size = 0;
232-
bool did_batch_size = false;
233232
bool try_cursor = true;
234233

235234
bson_return_val_if_fail (collection, NULL);
@@ -261,17 +260,12 @@ mongoc_collection_aggregate (mongoc_collection_t *collection, /* IN */
261260
(BSON_ITER_HOLDS_INT32 (&iter) ||
262261
BSON_ITER_HOLDS_INT64 (&iter) ||
263262
BSON_ITER_HOLDS_DOUBLE (&iter))) {
264-
did_batch_size = true;
265263
batch_size = (int32_t)bson_iter_as_int64 (&iter);
266264
BSON_APPEND_INT32 (&child, "batchSize", batch_size);
267265
}
268266
}
269267
}
270268

271-
if (!did_batch_size) {
272-
BSON_APPEND_INT32 (&child, "batchSize", 100);
273-
}
274-
275269
bson_append_document_end (&command, &child);
276270
}
277271

0 commit comments

Comments
 (0)