write_stage_common::skipWriteToOrphanDocument constructs a new ShardKeyPattern object from the shard key pattern BSON obj it gets from the collection metadata. This construction of a ShardKeyPattern object could be avoided by exposing the collection metadata's ShardKeyPattern object itself. This small optimization can be meaningful in the hot write path.
The same pattern can be optimized in update_stage and upsert_stage
- is related to
-
SERVER-61767 Optimizing the new way of filtering writes over orphan documents
- Closed