The size of the result batch returned from a legacy OP_QUERY find or a find command is determined as follows:
- If there is no batchSize set, add documents to the batch until the message size exceeds 1MB or we have 101 results.
- If there is a batchSize set, add documents to the batch until the message size exceeds 4MB or we have enough documents to satisfy the user-provided batchSize.
We should consider make the following improvements:
- Always size the batch at 16MB, rather than sometimes using 1MB and sometimes using 4MB.
- Enforce a maximum message size of 16MB, rather than stopping once we have exceeded 16MB.