[SERVER-60518] Best effort checks in range deleter can leave orphans Created: 07/Oct/21  Updated: 29/Oct/23  Resolved: 22/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 5.0.3, 4.4.9, 5.1.0-rc0
Fix Version/s: 5.2.0, 5.0.4

Type: Bug Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
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:
v5.1, v5.0, v4.4
Sprint: Sharding EMEA 2021-11-01
Participants:
Linked BF Score: 24

 Description   

This problem is present in different flavours on different branches.

The objective of this ticket is to understand if such checks can be eliminated (e.g. relying on the local collection catalog) and - if not - how to fix the issue.

v5.1 / v5.0

Before scheduling a range deletion task, a filtering metadata check (with eventual refresh) is performed to ensure the uuid is matching.
Afterwards, when actually scheduling the range cleanup, the metadata are checked again without refresh and without any guarantee on collection changes.

If - for some reason - the filtering metadata get cleared between the first and second check, the range deletion task ends up failing, leaving orphans on the node.

v4.4
The two checks are happening subsequently, but still metadata could be cleared in the very narrow interleaving between them.



 Comments   
Comment by Githook User [ 03/Nov/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-60518 Best effort checks in range deleter must not leave orphans
Branch: v5.0
https://github.com/mongodb/mongo/commit/62a84ede3cc9a334e8bc82160714df71e7d3a29e

Comment by Githook User [ 27/Oct/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-60518 Best effort checks in range deleter must not leave orphans
Branch: v5.1
https://github.com/mongodb/mongo/commit/7c57ae156eb9519c1cde7e30df1ee08d81efeb2d

Comment by Githook User [ 22/Oct/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-60518 Best effort checks in range deleter must not leave orphans
Branch: master
https://github.com/mongodb/mongo/commit/3ed974c923ccbc97f55335c5c99b00cc0e5dad73

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