[SERVER-48190] Race between drop and range delete can cause it to hit an invariant Created: 13/May/20  Updated: 29/Oct/23  Resolved: 13/May/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.4.0-rc6, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Matthew Saltz (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Steps To Reproduce:

1. Migration cleanup decides to kick off range deletion on source.
2. Collections gets dropped.
3. SSV comes in to reset shard version to 0.
4. Range deletion grabs collection sharding state under collection IS lock.
5. Metadata refreshes to become unsharded under collection IX lock.
6. Range deletion tries to schedule range deletion and hits invariant

Sprint: Sharding 2020-05-18
Participants:
Linked BF Score: 35

 Comments   
Comment by Githook User [ 14/May/20 ]

Author:

{'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com', 'username': 'saltzm'}

Message: SERVER-48190 Acquire CSRLock in shared mode before submitting ranges for deletion

(cherry picked from commit 7404de00911b537a78074370b3643d774aaa9dd3)
Branch: v4.4
https://github.com/mongodb/mongo/commit/abf419c46ca4df9b6f3948e450dfa7d8f8ac0a87

Comment by Githook User [ 13/May/20 ]

Author:

{'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com', 'username': 'saltzm'}

Message: SERVER-48190 Acquire CSRLock in shared mode before submitting ranges for deletion
Branch: master
https://github.com/mongodb/mongo/commit/9640339b565c6b9504bc0d6519f44dec1c8c0aff

Generated at Thu Feb 08 05:16:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.