You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2013/07/26 12:11:55 UTC
[jira] [Resolved] (SLING-2979) Add support for running scheduled
task only on the leader
[ https://issues.apache.org/jira/browse/SLING-2979?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved SLING-2979.
-------------------------------------
Resolution: Fixed
Added in 1507250
I've added support for the leader evaluation which is optional. So this scheduler still runs in systems without the discovery api - in that case the flag to restrict a job on running on the leader is ignored.
If the discovery api is available, the leader information is evaluated. To avoid registering/unregistering jobs when the leader changes (and keeping track of them etc.), all jobs are scheduled, however if a job should only run on a leader and it is scheduled on a non leader, then the its scheduled but not executed.
> Add support for running scheduled task only on the leader
> ---------------------------------------------------------
>
> Key: SLING-2979
> URL: https://issues.apache.org/jira/browse/SLING-2979
> Project: Sling
> Issue Type: New Feature
> Components: Commons
> Reporter: Carsten Ziegeler
> Assignee: Carsten Ziegeler
> Fix For: Commons Scheduler 2.4.0
>
>
> With the new topology api we have support for leader election. In many cases scheduled tasks should only run on a single instance in a cluster. So far this can only be done by manually adding the task through the Scheduler interface but not with the whiteboard support.
> We should add a new property scheduler.leaderonly which defaults to false but can be set to true. IN this case the task is only started on the leader.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira