-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Service Arch
Currently, AsyncRequestsSender requests may only be created using a BSONObj version of a command to run.
This means that any command run via this (which includes all write commands sent mongod -> mongos) must be serialized via its IDL-generated serialize implementation that serializes to a BsonObjBuilder. Notably, this means that any array in a command will be serialized as a BSON array, even if the command argument supports OP_MSG document sequences, which are more space-efficient.
We should add support to AsyncRequestsSender to allow running an OpMsgRequest rather than just a BSONObj. Then we could switch to serializing commands using their IDL-generated serialize implementations that produce OpMsgRequests and utilize the more efficient encoding. This would allow us to more efficiently send batched writes to shards.
We would also want to update our write op size estimation logic if we do this, since currently we account for the per-array-element overhead for each op.
- is related to
-
SERVER-90056 Use document sequences for mongos -> mongod write commands
- Closed