-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Replication
-
Fully Compatible
-
Repl 2023-10-02, Repl 2023-10-16, Repl 2023-10-30, Repl 2023-11-13
Each update/delete statement inside the ops field could contain an unstable sampleId field used internally for PM-1858. On mongos, currently WriteOp::targetWrites already handles assigning sampleId to TargetedWrite. And we simply need to attach the sampleId field to the sampled statement in bulkWrite before sending to shards. On mongod, when executing sampled statements, we need to construct sampled update/delete queries and add them to the QueryAnalysisWriter, similar to what update / delete does today. Additionally for update statements, we need to make sure we set up the sampleId correctly in the UpdateRequest so that QueryAnalysisOpObserver can work properly when storing the diff for a sampled write query. Last but not least, we need to make sure that query sampling handles WouldChangeOwningShard updates correctly for bulkWrite as well (SERVER-73255). But this may come for free if we reuse error handling logic from write_op_exec.cpp.
- is depended on by
-
SERVER-82826 Unittest coverage for shard key metrics sampling for bulkWrite
- Closed
- is related to
-
SERVER-82382 Batch/Bulk write size estimation logic on mongos doesn't account for sampleId fields
- Backlog