[SERVER-68348] Asynchronously register tasks on the range deleter service on step-up Created: 27/Jul/22  Updated: 29/Oct/23  Resolved: 12/Sep/22

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

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

Issue Links:
Depends
depends on SERVER-67636 Associate range deleter service lifet... Closed
is depended on by SERVER-65558 Enable Feature flag for PM-2849 Closed
Problem/Incident
causes SERVER-72818 Wait for range deleter service to be ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2022-08-22, Sharding EMEA 2022-09-05, Sharding EMEA 2022-09-19
Participants:
Linked BF Score: 170

 Description   

Since the range deleter service lifetime is associated with step-up/down (SERVER-67636), non-pending range deletions must be recovered on step-up. The re-registration on the service should happen asynchronously, so that step-up will not be blocked by the initialization of the range deleter.

A possible way to do so will be the following:

  • Acquire the global scoped range deleter lock
  • Spawn a new thread, passing it the scoped lock:
    • Recover "processing range deletions" (pick up from disk all processing range deletions and register them with the default ongoing queries future)
    • Recover "non-pending" range deletions (pick up from disk all non-pending range deletions and register them with the default ongoing queries future)

This way, the step-up will not be blocked by the recovery of range deletions and - at the same time - it will not be possible to miss documents because no thread will be allowed to write on the config.rangeDeletions collection as long as the lock will be in scope.

The recovery performed on the legacy range deleter can partially serve as an example for the work to be done under this ticket. Also, remember to feature flag the legacy recovery as part of this ticket.



 Comments   
Comment by Githook User [ 12/Sep/22 ]

Author:

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

Message: SERVER-68348 Asynchronously register tasks on the range deleter service on step-up
Branch: master
https://github.com/mongodb/mongo/commit/727d3de09c9e38206cbde56c8a431f6e7b480da6

Comment by Githook User [ 10/Sep/22 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: Revert "SERVER-68348 Asynchronously register tasks on the range deleter service on step-up"

This reverts commit 30583a2c505c03e4d54bbb14cab170b225c071f2.
Branch: master
https://github.com/mongodb/mongo/commit/fba24ea907dd3220fd2e3149c6ac81fd67b16254

Comment by Githook User [ 07/Sep/22 ]

Author:

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

Message: SERVER-68348 Asynchronously register tasks on the range deleter service on step-up

Co-authored-by: Pierlauro Sciarelli <pierlauro.sciarelli@mongodb.com>
Co-authored-by: Silvia Surroca <silvia.surroca@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/30583a2c505c03e4d54bbb14cab170b225c071f2

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