Original Downstream Change Summary
Add a new option, "dryRun", to the collMod command that is not a part of the stable API.
When running collMod with unique: true and dryRun: true on an existing non-unique index, the server will scan every key and check for duplicates. If duplicates are detected, it will return a CannotConvertIndexToUnique error with a list of violations. The user is expected to fix these conflicting documents before expecting a successful conversion.
This flag is only meant to be used alongside "unique: true". Other combinations are disallowed.
Description of Linked Ticket
Running this option with the collMod command indicates that we will not attempt to convert the index.
- documents
-
SERVER-61160 Add dryRun option to the collMod command
- Closed