[SERVER-34115] Make PeriodicRunner::scheduleJob return a job handle through which the job period can be changed Created: 23/Mar/18  Updated: 26/Mar/18  Resolved: 26/Mar/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

The use case is for SERVER-33295, which adds a background thread to periodically check for and abort snapshot transactions that have expired. Transactions expire based on an adjustable server parameter, TransactionLifetimeLimit, on which we want to base the period of the background job – if TransactionLifetimeLimit is very high, we don't want to run the thread often, and if it is low, we want to run the thread more frequently. SERVER-33295 will instead set a period of 1 second – the lowest TransactionLifetimeLimit setting – and use a static function variable to track the period on which it actually wants to run, based on checking TransactionLifetimeLimit.



 Comments   
Comment by Dianna Hohensee (Inactive) [ 26/Mar/18 ]

Closing because I don't believe this is the right solution anymore. The use case stated in the Description is still valid. However, server parameters can change without notification, so the job would need to check and adjust its own period after every run. This would require the function passed into scheduleJob to be able to somehow get at its own job handle, which isn't what this ticket requests.

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