roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anil Gangolli (JIRA)" <>
Subject [Roller-JIRA] Commented: (ROL-1294) Task scheduling is inconsistent due to use of java.util.Timer
Date Mon, 28 May 2007 16:51:55 GMT


Anil Gangolli commented on ROL-1294:

Note that some of the tasks expect to be running in only one thread at a time and have no
exclusion mechanism within their own logic to deal with multiple copies of the task running
at once.  TimerTask being single threaded was giving us that.  

We should make sure that the scheduling will still ensure this even in the face of delays.

Also one way to handle delayed execution with TimerTask is to catch up by skipping task executions
after a certain max tardiness.  In most cases we just want to run once per interval anyway.

> Task scheduling is inconsistent due to use of java.util.Timer
> -------------------------------------------------------------
>                 Key: ROL-1294
>                 URL:
>             Project: Roller
>          Issue Type: Bug
>    Affects Versions: 3.1
>            Reporter: linda skrocki
>            Assignee: Allen Gilliland
>             Fix For: 4.0
> Roller's ThreadManagerImpl class uses a java.util.Timer class to schedule and run all
of it's periodic tasks, however, this approach is not well suited for Roller's specific tasks.
 As detailed in the javadoc for the java.util.Timer class, long running tasks can backup in
a timer and cause the scheduling to get off track ...
> "Corresponding to each Timer object is a single background thread that is used to execute
all of the timer's tasks, sequentially. Timer tasks should complete quickly. If a timer task
takes excessive time to complete, it "hogs" the timer's task execution thread. This can, in
turn, delay the execution of subsequent tasks, which may "bunch up" and execute in rapid succession
when (and if) the offending task finally completes." 
> To ensure more consistent behavior for the running of scheduled tasks we need to improve
the implementation of the task scheduler in the ThreadManagerImpl.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message