[SERVER-83454] Range Deleter Service registration and de-registration should not rely on onCommit ordering guarantees Created: 20/Nov/23  Updated: 08/Feb/24  Resolved: 12/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 7.0.0, 7.1.0, 7.3.0-rc0, 7.2.0-rc2
Fix Version/s: 7.2.1, 7.3.0-rc0, 7.0.6

Type: Bug Priority: Major - P3
Reporter: Allison Easton Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-77513 Range deletion document removal commi... Closed
Assigned Teams:
Catalog and Routing
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.2, v7.1, v7.0
Sprint: CAR Team 2023-12-25, CAR Team 2024-01-08, CAR Team 2024-01-22
Participants:
Linked BF Score: 8
Story Points: 2

 Description   

In SERVER-77513, the de-registration of the range deletion tasks was move from onDelete to an onCommit handler registered by onDelete. This was intended to ensure that the task from the insertion/update happened before that of the deletion of the same document while also ensuring that the changes couldn't be rolled back.
However, this relied on us having ordering guarantees for onCommit handler, meaning that if there was an insert and then a delete of the same document, we were assuming that the onCommit for the insertion had to happen before that of the deletion. However, this is not the case. There are no ordering guarantees for ordering of onCommit handlers from different writers.

 

This can lead to a case as shown in BF-30367 where a range deletion task is left in memory because the de-registration of the task happened before the insertion of the task.



 Comments   
Comment by Githook User [ 08/Feb/24 ]

Author:

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

Message: SERVER-83454 Explicitly deregister range deletion tasks rather than relying on onCommit handler (#17803)
Branch: v7.2
https://github.com/mongodb/mongo/commit/10e283f1dfacacd4894b2feaea59c75c1128f267

Comment by Githook User [ 02/Feb/24 ]

Author:

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

Message: SERVER-83454 Explicitly deregister range deletion tasks rather than relying on onCommit handler (#17803)

GitOrigin-RevId: ea7e9291838de9ee2e3857f6da2c4ad606c0a1f3
Branch: v7.0
https://github.com/mongodb/mongo/commit/9bf19de3f6af819ae035ad8360dd2a5f78b300ef

Comment by Githook User [ 12/Jan/24 ]

Author:

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

Message: SERVER-83454 Explicitly deregister range deletion tasks rather than relying on onCommit handler (#17803)

GitOrigin-RevId: ceb388f7d6ac8b220eac4b15e62c3c0bb50ed5e0
Branch: master
https://github.com/mongodb/mongo/commit/607f4abf697c866281c9a7b08094dc90fc531817

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