[SERVER-81241] Range deleter processor must not try reschedule task during service shutdown Created: 20/Sep/23  Updated: 31/Oct/23  Resolved: 20/Sep/23

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 7.1.1, 7.2.0-rc0, 7.0.3

Type: Bug 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:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.1, v7.0
Sprint: Sharding EMEA 2023-10-02
Participants:
Linked BF Score: 152

 Description   

The range deleter service service shutdown procedure is:

  1. Set the state as down
  2. ....do some more stuff....
  3. Turn off the range deletions processor

Hence when a range deletion throws IndexNotFound right while the service is stopping (between 1 and 3), it can happen that the processor tries to reschedule the task while the state is changing triggering this invariant.

The solution is to hold the proper locks when emplacing the range deletion as it happens here or to simply change emplaceRangeDeletions to result in a no-op when called while the service is not up.



 Comments   
Comment by Githook User [ 31/Oct/23 ]

Author:

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

Message: SERVER-81241 Range deleter processor must gracefully handle task rescheduling during shutdown
Branch: v7.1
https://github.com/mongodb/mongo/commit/4680956cc0146c09ea11c4fe20c333af9f10d5b9

Comment by Githook User [ 21/Sep/23 ]

Author:

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

Message: SERVER-81241 Range deleter processor must gracefully handle task rescheduling during shutdown
Branch: v7.0
https://github.com/mongodb/mongo/commit/31b4eeb71454c5610174894c494f3768ec334c10

Comment by Githook User [ 20/Sep/23 ]

Author:

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

Message: SERVER-81241 Range deleter processor must gracefully handle task rescheduling during shutdown
Branch: master
https://github.com/mongodb/mongo/commit/7e09aed88d360c2f3987501172828ab74ad876b9

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