[SERVER-46849] Range deletion task submission via OpObserver is racy Created: 13/Mar/20  Updated: 29/Oct/23  Resolved: 27/Mar/20

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

Type: Bug Priority: Major - P3
Reporter: Matthew Saltz (Inactive) Assignee: Matthew Saltz (Inactive)
Resolution: Fixed Votes: 0
Labels: sharding-csrs-stepdown-also
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
is related to SERVER-46395 Resumable range deleter can submit du... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Sharding 2020-04-06
Participants:
Linked BF Score: 32

 Description   

When we submit ranges for deletion on recipient shards, we submit them through the onUpdate OpObserver when an update is received to remove the 'pending' flag from a document in config.rangeDeletions. This submits an async task which will eventually cause the range to be deleted. The problem is that if the deletion task reaches this line before the commit of the update that triggered it, then it may find that the update has not yet occurred, leading this task to be abandoned. This will lead to orphaned documents until failover, a consequence of which is that incoming migrations for that range will be blocked.



 Comments   
Comment by Githook User [ 27/Mar/20 ]

Author:

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

Message: SERVER-46849 Submit range deletion task in an onCommit handler

(cherry picked from commit efbe46ec29d5a7ba6bd1786a5c9b47fd44b731d3)
Branch: v4.4
https://github.com/mongodb/mongo/commit/d853229b9b7153429f46ef075c7092218c540c11

Comment by Githook User [ 27/Mar/20 ]

Author:

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

Message: SERVER-46849 Submit range deletion task in an onCommit handler
Branch: master
https://github.com/mongodb/mongo/commit/efbe46ec29d5a7ba6bd1786a5c9b47fd44b731d3

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