-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
Fully Compatible
-
CAR Team 2025-08-18, CAR Team 2025-09-01
-
🟥 DDL
-
None
-
None
-
None
-
None
-
None
-
None
The new DropIndexesCoordinator will issue a command to all shards that own data in order to check that the dropIndexes is doable on all of them.
To achieve that we'll need to implement a dryRun mode for the _shardsvrDropIndexesParticipant command.
- A new optionalBool parameter called `dryRun` will be added to the request for `_shardsvrDropIndexesParticipant`.
When this parameter is included in the request and its value is `true`, it will be checked whether it's feasible to drop the given indexes by sending the same errors that would have been thrown by a standard dropIndexes command. If all the checks pass within the `dryRun` mode, the command should return a successful response without actually dropping any index. - A new optional {owned_object} parameter called `shardKeyPattern` will be added too. When this parameter is included, we'll assume the collection is sharded and will avoid dropping the last index with the given shardKey. If that's the case, the command will throw `CannotDropShardKeyIndex`. This is necessary because dropIndexes is only running this check when the ShardVersion is attached to the command. Since we're not going to use the ShardVersion protocol to dispatch the _shardsvrDropIndexesParticipant command, we need to find another way to check this.
- related to
-
SERVER-109160 Expose the dryRun mode for dropIndexes to users
-
- Backlog
-