|
Here are some ways to approach this ticket:
- Test aggregate with $out in the shell and see why batchSize=0 is really an issue (as you can tell, I myself don't have a great understanding).
- Modify example-client.c to try mongoc_collection_aggregate with $out and batch size as options to see how it works in the C driver
- Make the change in mongoc-collection.c. We already have a _has_out_key to check for specific behavior for $out in a pipeline. That's here.
- Then, make mock server tests to check that we are not sending batchSize=0 when $out is included, that we are sending it when $out is omitted, and that we are sending batchSize>0 when $out is included.
Here's an example of the mock server we fumbled through together, slightly cleaned up and commented:
https://gist.github.com/kevinAlbs/8c96d2693f0611a0cc267407a67e7774
|