You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/05/25 00:01:20 UTC

[jira] [Commented] (CLOUDSTACK-2680) Async job expunge thread expunges not only inactive jobs, but also the jobs that are currently being processed

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-2680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13666727#comment-13666727 ] 

ASF subversion and git services commented on CLOUDSTACK-2680:
-------------------------------------------------------------

Commit 2ecf9e3293d9b5f1ccffe0736bc8ef0cbf3b1529 in branch refs/heads/master from [~alena1108]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=2ecf9e3 ]

CLOUDSTACK-2680: Async job expunge thread - expunge only:

1) Unfinished jobs that are yet to be processed.
2) Completed jobs

The jobs that are in process, will be skipped by the expunge thread

Conflicts:
	server/src/com/cloud/async/dao/AsyncJobDao.java
	server/src/com/cloud/async/dao/AsyncJobDaoImpl.java
	server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java

                
> Async job expunge thread expunges not only inactive jobs, but also the jobs that are currently being processed
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-2680
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2680
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server
>    Affects Versions: 4.1.0
>            Reporter: Alena Prokharchyk
>            Assignee: Alena Prokharchyk
>             Fix For: 4.2.0
>
>
> Async Job Expunge thread that expunges jobs being in the async_job table for more than "job.expire.minutes", expunge not only inactive (waiting) jobs, but also the jobs that are currently being processed. It affects all cloudStack jobs. It wasn't caught before because the default expire 
> interval is 1 day, and the job would expire faster on the backend (30 mins is 
> the default timeout). 
> So here what happens in snapshot case: 
> 1) Set "concurrent.snapshots.threshold.perhost"=1, job.expire.minutes=15 mins 
> 2) First createSnapshot API was executed at "X" time. Async job1 was created. 
> As there were no other snapshot jobs, the command was sent for execution to the 
> backend. 
> 3) Second createSnapshot was executed at "X + 30 seconds" time. Async job2 was 
> created. Job2 is sitting in the queue and waiting on a job1 to finish. 
> 4) The job1 didn't return back in 15 mins, and it was considered as expired by 
> the AsyncJobManager, and removed from the queue (although it was already 
> processed) 
> 5) The background process checking on the sync status for job2 (runs every 10 
> seconds), found out that there is nothing blocking job2 any more, and sent it 
> to the backend. 
> The recommended fix would be: expire/expunge only inactive and already 
> completed jobs. Don't touch the jobs that are currently being processed.

--
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