[SERVER-45917] Race between submitting rangeDeletion task can make moveChunk fail to honor waitForDelete Created: 31/Jan/20  Updated: 29/Oct/23  Resolved: 06/Feb/20

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

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2020-02-10
Participants:
Linked BF Score: 34

 Description   

Sequence:

1. Migration finishes committing.
2. Migration updates rangeDeleter doc to remove pending flag.
3. OpObserver captures update and calls submitRangeDeletionTask, which sends a task to the arbitraryExecutor.
4. Migration main thread calls CSR::waitForClean
5. MetadataManager::trackOrphanedDataCleanup returns nothing since the range delete task has not yet been queued. Migration thread treats this as deletion being completed.
6. Migration main thread returns.
7. Actual range deletion task submitted in step#3 gets executed and queues orphan deletion.



 Comments   
Comment by Githook User [ 06/Feb/20 ]

Author:

{'name': 'Jack Mulrow', 'username': 'jsmulrow', 'email': 'jack.mulrow@mongodb.com'}

Message: SERVER-45917 Make waitForDelete wait for deletion to be scheduled before waiting for clean
Branch: master
https://github.com/mongodb/mongo/commit/f9720bbc2af0aac605f2c0d0bbbef2a9ce2f05c2

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