Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
Catalog and Routing
-
2
Description
In today's codebase we have code such as this one where the recipient of a command asserts that it contains read/write concern and also there are a lot of sharding DDL commands (such as _shardsvrCreateCollection that assert that the write concern is majority.
These checks are at best a crutch from the past where sharded DDL was executed in the body of the command and we wanted to "make sure we didn't forget to write something with majority". In today's world we have DDL coordinators which are supposed to do the right thing and perform reads and writes with the appropriate concerns.
This ticket is to go through all the places that check for read/write concerns and remove them because they make writing new code difficult since now every command invocation needs to be specialised like this.
Some suggestions for a way to search for these places:
- Code in ServiceEntryPointCommon
- Calls to CommandHelpers::uassertCommandRunWithMajority