[SERVER-35585] Make PeriodicRunner jobs be pausable/resumable Created: 13/Jun/18  Updated: 08/Jan/24  Resolved: 03/Jul/18

Status: Closed
Project: Core Server
Component/s: Concurrency
Affects Version/s: None
Fix Version/s: 4.0.3, 4.1.1

Type: Task Priority: Major - P3
Reporter: Matthew Saltz (Inactive) Assignee: Matthew Saltz (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-31586 Recreate PeriodicBalancerSettingsRefr... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0
Sprint: Sharding 2018-06-18, Sharding 2018-07-02, Sharding 2018-07-16
Participants:

 Description   

For SERVER-31586, it would be nice to use the PeriodicRunner interface, but currently there's no way for jobs in the PeriodicRunner to be paused or resumed. For that ticket, it would be good to be able to pause execution of a job on step down, and resume execution of the job on step up. This ticket is to add generic pause/resume functionality to jobs in the PeriodicRunner.



 Comments   
Comment by Githook User [ 05/Sep/18 ]

Author:

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

Message: SERVER-35585 Make PeriodicRunner jobs be pausable/resumable

(cherry picked from commit 738ee996e0a1f5b0c92f27f2746d94d14092c1bd)
Branch: v4.0
https://github.com/mongodb/mongo/commit/0c8bcccfa46887bef1b35a81324df37e95b38f38

Comment by Mira Carey [ 28/Aug/18 ]

kaloian.manassiev, there was a parallel implementation added a little into 4.1 dev (for embedded. It piggy back's jobs on user threads as requests come in, rather than using background threads). it would be an easier backport for the mobile project (which is still targeting 4.0) if the periodic runner had the same shape.

I don't think the backport would be particularly risky. The periodic runner is a fairly isolated component and that change has been pretty quiet in terms of bfs/changes. I might wait on SERVER-36725 though (the test for the type is a little flakier than it needs to be at this exact moment)

Comment by Kaloian Manassiev [ 27/Aug/18 ]

Why do we need to backport this? This functionality was introduced for the purposes of the auto-splitter project, which is not getting backported.

 

As for the complexity, I don't know because this was implemented under the guidance of mira.carey@mongodb.com.

Comment by Githook User [ 03/Jul/18 ]

Author:

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

Message: SERVER-35585 Make PeriodicRunner jobs be pausable/resumable
Branch: master
https://github.com/mongodb/mongo/commit/738ee996e0a1f5b0c92f27f2746d94d14092c1bd

Generated at Thu Feb 08 04:40:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.