Summary
A batchSize may be set on a mongoc_cursor_t in two ways.
mongoc_collection_find_with_opts allows setting batchSize through the bson_t opts. It accepts either int32 or int64.
mongoc_cursor_set_batch_size only overwrites the internally set batchSize if it was previously set as an int64.
I expect that mongoc_cursor_set_batch_size should overwrite the batchSize if it was also previously set as an int32.
Attached is a proposed regression test.
How to Reproduce
A regression test is attached.
Proposed Scope
- Have mongoc_cursor_set_batch_size override a batchSize that was set as an int32 option.