Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0023767 | Openbravo ERP | A. Platform | public | 2013-05-08 17:13 | 2013-05-23 01:33 |
|
Reporter | caristu | |
Assigned To | alostale | |
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | 3.0MP24 | Fixed in Version | 3.0MP24 | |
Merge Request Status | |
Review Assigned To | AugustoMauch |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0023767: Background process scheduled weekly executed after restart tomcat |
Description | Some background process scheduled weekly are executed after restarting tomcat under some circumstances. |
Steps To Reproduce | 1) 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. |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0023653 | 3.0MP23 | closed | alostale | Incorrect execution time for daily processes scheduled PM | related to | feature request | 0041483 | | closed | caristu | update quartz |
|
Attached Files | |
|
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 | bug_revision_view_page.php?bugnote_id=0058627#r4708 |
2013-05-14 09:47 | alostale | Note Edited: 0058627 | bug_revision_view_page.php?bugnote_id=0058627#r4709 |
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 |
Notes |
|
|
This might be related with policy applied on missfire |
|
|
(0058627)
|
alostale
|
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
|
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
---
|
|
|
|
Code reviewed and verified in pi@2f11b5d67c9a |
|
|
|
|