[SERVER-81245] dropIndex should broadcast to every shard Created: 20/Sep/23  Updated: 21/Sep/23  Resolved: 21/Sep/23

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

Type: Bug Priority: Major - P3
Reporter: Enrico Golfieri Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Assigned Teams:
Sharding EMEA
Operating System: ALL
Participants:
Linked BF Score: 3

 Description   

Currently dropIndex only runs on shards that own chunks for the input namespace.

This can cause an issue because we might miss an index if a background migration drains a shard right before running the drop

The perfect solution would be to clean from the shard any residual metadata after a shard is drained.

For now, as implemented for SERVER-71819  a good approach can be

  • run dropIndex on every shard that own chunks and ensure the response is OK
  • run dropIndex on every shard that DOESN'T own a chunk and ignore the response (best effort)

This will mitigate (but not solve) the issue



 Comments   
Comment by Enrico Golfieri [ 21/Sep/23 ]

We decided at the end not to do this ticket since the recipient once receives a first migration for a collection already drops all the leftover indexes related to that collection (in case the collection was already placed on that shard before)

The only known issue related to the current behaviour of dropIndex is validateDbMetadata which should probably prevent any index check if the shard doesn't own any chunk for the collection

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