[SERVER-80831] Support explain for bulkWrite on mongos Created: 06/Sep/23  Updated: 12/Dec/23  Resolved: 12/Dec/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Wenbin Zhu Assignee: Sean Zimmerman
Resolution: Fixed Votes: 0
Labels: milestone-2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-76497 Support explain for bulkWrite on mongod Closed
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-12-11, Repl 2023-12-25
Participants:

 Description   

This ticket is to make it work on mongos.

 

This will need to add functions for explain validity in mongos too. See https://github.com/10gen/mongo/blob/bc15bbc4376d94be39fe3748c996fcf5cab767d8/src/mongo/s/commands/cluster_write_cmd_s.cpp#L52

https://github.com/10gen/mongo/blob/bc15bbc4376d94be39fe3748c996fcf5cab767d8/src/mongo/s/commands/cluster_write_cmd.h#L124

and https://github.com/10gen/mongo/blob/bc15bbc4376d94be39fe3748c996fcf5cab767d8/src/mongo/db/s/cluster_write_cmd_d.cpp#L61



 Comments   
Comment by Githook User [ 12/Dec/23 ]

Author:

{'name': 'seanzimm', 'email': 'sean.zimmerman@mongodb.com', 'username': 'seanzimm'}

Message: SERVER-80831 Support Explain for bulkWrite on mongos

GitOrigin-RevId: 7f42ebfdcfc82bbb87e9757dc214f5559739704a
Branch: master
https://github.com/mongodb/mongo/commit/45e9ad08f51011a22345b0c95e7226ecb0b804b1

Comment by Wenbin Zhu [ 06/Sep/23 ]

Besides what is mentioned in the description, another challenge seems to be how to avoid code duplication by refactoring and reusing the code in `cluster_write_command`. SERVER-76497 reused most of the code in the normal write path on mongod, and ideally we should also reuse as much as possible in the mongos case.

Generated at Thu Feb 08 06:44:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.