[SERVER-21688] Do not allow index for shard key to be dropped on sharded collections Created: 27/Nov/15  Updated: 06/Dec/22  Resolved: 05/Jul/17

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Ruoping Xu Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-6491 Prevent dropping shard key index when... Closed
Assigned Teams:
Sharding
Participants:

 Description   

With sharded collections, the index that the shard key is dependent on can be dropped, this prevents moveChunk() from working on the collection.

Steps to reproduce:
1. Start with an already sharded collection.
2. Drop the shard key from the indexes.
3. Attempt to run moveChunk(). This should fail with "errmsg" : "can't find index in storeCurrentLocs :: caused by :: "



 Comments   
Comment by Kelsey Schubert [ 05/Jul/17 ]

On review, this appears to a be a duplicate of SERVER-6491. Please continue to watch SERVER-6491 for updates.

Kind regards,
Thomas

Comment by Kelsey Schubert [ 04/Dec/15 ]

Hi ruoping,

Thank you for the report. I have verified that is possible to drop the shard key index. I would recommend recreating the shard key index to execute moveChunk().

I am repurposing this ticket as an improvement request to add protection to the shard key index.

Kind regards,
Thomas

Comment by Ruoping Xu [ 28/Nov/15 ]

More notes: the drop is allowed even if the shard key is the last remaining index for the collection.

Generated at Thu Feb 08 03:58:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.