Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0023767
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2013-05-08 17:132013-05-23 01:33
ReportercaristuView Statuspublic 
Assigned Toalostale 
PriorityhighResolutionfixedFixed in Version3.0MP24
StatusclosedFix in branchFixed in SCM revision9aa5b4b992aa
ProjectionnoneETAnoneTarget Version3.0MP24
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0023767: Background process scheduled weekly executed after restart tomcat

DescriptionSome background process scheduled weekly are executed after restarting tomcat under some circumstances.
Steps To Reproduce1) Go to Process Request and create a new record, schedule a process weekly.
2) Once the process has been executed change its status in ad_process_run to 'PRC', to simulate that the process has fallen down.
3) Go back to the Process Request window, unschedule the process, and schedule it using weekly frequency again
4) Restart Tomcat. Check in the ad_process_run table that after restarting tomcat the process is executed again.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00236533.0MP23 closedalostale Incorrect execution time for daily processes scheduled PM 
related to feature request 0041483 closedcaristu update quartz 

-  Notes
(0058514)
alostale (manager)
2013-05-09 08:39

This might be related with policy applied on missfire
(0058627)
alostale (manager)
2013-05-14 09:43
edited on: 2013-05-14 09:47

The problem is indeed with misfire policy applied to CronTriggers (the ones used for weekly schedules).

Whereas default policy applied to SimpleTrigger (i.e. daily schedules) don't execute the process on misfire, CronTriggers are executed when they are misfired.

The steps to reproduce are slightly different:

1- Create a new Process Request
2- Schedule it to run weekly on:
  * today's weekday (i.e. Tuesday)
  * Start Date: today (i.e. 14-05-2013)
  * Start Time: one hour *before* now (i.e. 8:00)
3- Schedule the process

When the process is scheduled (step #3), scheduler detects a missfire in the process: it should have been executed today at 8:00 but it didn't. Because of default missfire policy for this kind of schedules, the process is executed. Note process is executed regardless other executions status or Tomcat being restarted.

More info about missfire options: http://nurkiewicz.blogspot.com.es/2012/04/quartz-scheduler-misfire-instructions.html [^]

The misfire policy for all cases should be the same: don't execute on misfire and wait for next regular execution time, meaning if the process couldn't be executed on previous scheduled time (due to server being down or any other issue), it shouldn't be executed until next scheduled time, not on server restart nor on reschedule.

(0058628)
hgbot (developer)
2013-05-14 09:52

Repository: erp/devel/pi
Changeset: 9aa5b4b992aa45323b3d19b815bdf1cf8df6178c
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue May 14 09:53:08 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9aa5b4b992aa45323b3d19b815bdf1cf8df6178c [^]

fixed bug 23767: weekly scheduled processes executed on misfire

---
M src/org/openbravo/erpCommon/ad_process/RescheduleProcess.java
M src/org/openbravo/scheduling/OBScheduler.java
---
(0058687)
AugustoMauch (administrator)
2013-05-17 14:31

Code reviewed and verified in pi@2f11b5d67c9a
(0058810)
hudsonbot (developer)
2013-05-23 01:33

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/97c7f6256af7 [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2013-05-08 17:13 caristu New Issue
2013-05-08 17:13 caristu Assigned To => AugustoMauch
2013-05-08 17:13 caristu Modules => Core
2013-05-08 17:13 caristu Resolution time => 1371160800
2013-05-08 17:13 caristu Triggers an Emergency Pack => No
2013-05-08 17:15 caristu Issue Monitored: networkb
2013-05-09 08:23 alostale Relationship added related to 0023653
2013-05-09 08:39 alostale Note Added: 0058514
2013-05-09 20:42 johnfandl Issue Monitored: johnfandl
2013-05-09 20:43 johnfandl Issue End Monitor: johnfandl
2013-05-09 20:43 johnfandl Issue Monitored: johnfandl
2013-05-14 08:14 alostale Assigned To AugustoMauch => alostale
2013-05-14 09:43 alostale Note Added: 0058627
2013-05-14 09:46 alostale Note Edited: 0058627 View Revisions
2013-05-14 09:47 alostale Note Edited: 0058627 View Revisions
2013-05-14 09:52 hgbot Checkin
2013-05-14 09:52 hgbot Note Added: 0058628
2013-05-14 09:52 hgbot Status new => resolved
2013-05-14 09:52 hgbot Resolution open => fixed
2013-05-14 09:52 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9aa5b4b992aa45323b3d19b815bdf1cf8df6178c [^]
2013-05-14 09:53 alostale Review Assigned To => AugustoMauch
2013-05-17 14:31 AugustoMauch Note Added: 0058687
2013-05-17 14:31 AugustoMauch Status resolved => closed
2013-05-17 14:31 AugustoMauch Fixed in Version => 3.0MP24
2013-05-23 01:33 hudsonbot Checkin
2013-05-23 01:33 hudsonbot Note Added: 0058810
2019-10-17 17:39 caristu Relationship added related to 0041483


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker