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.
- is duplicated by
-
SERVER-4727 MaxBytesToReturnToClientAtOnce seems inconsistent with BSONObjMaxUserSize
- Closed
- related to
-
SERVER-19816 Oplog replication throughput is bounded by network latency
- Closed
-
SERVER-25551 Aggregation batchSize can't be set on subsequent getMore in the shell
- Closed