-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
TheĀ sharding_ddl_util::removeCollAndChunksMetadataFromConfigremoveCollAndChunksMetadataFromConfig() helper method implements the removal of any sharding metadata concerning a collection and supports the commit of several DDL operations (such as dropCollection, dropDatabase, convertToCapped).
Due to historical reason, such an implementation is composed by 3 non-atomic steps, and this may potentially introduce undesired side effects in case the DDL doesn't adopt replay protection countermeasures.
This can be easily improved by converting removeCollAndChunksMetadataFromConfig() into a transaction.