|
Currently, write commands that are sent between nodes (i.e. from mongos to shards or from RS secondaries to a RS primary) are serialized to BSON. This results in a lot of effort to ensure that any command that we serialize does not result in a command that goes over the maximum BSON size. One alternative to this approach is to use OP_MSG payload type 1, where the set of inserts/updates/deletes can be serialized to a document sequence. The advantage of this is that write commands can use up to 48 MiB of memory, as opposed to the 16 MB BSONObject size limit.
This ticket tracks the work to update internal clients which send write commands over the wire to leverage OP_MSG document sequences instead of serializing the entire command to BSON.
|