-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Catalog and Routing
-
ALL
-
v8.0
As a part of PM-3364 after SERVER-81189 the {create..} command instead of running directly against the primary will run _shardsvrCreateCollection on the primary which creates the collection.
However, in case {create...} runs a part of a transaction, the following check is perform on mongos which fails in case of _shardsvrCreateCollection due to CommandHelpers::findCommand since the command is only present on shard servers
As a part of SERVER-81189 a simple fix was added to force returning false in case of _shardsvrCreateCollection: https://github.com/mongodb/mongo/search?q=SERVER-82282&type=Code
There is no good reason to fail in case the command is not found since this check is already performed by the entry point .
The helper should probably instead either:
- return default false in case a command is not found
- perform the check on the shard instead of mongos
- Any other solution that can make the code better maintainable
- is caused by
-
SERVER-81189 Transform `create` requests in sharded cluster to `_shardSvrCreateCollection`
- Closed