Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0026794Openbravo ERPA. Platformpublic2014-06-05 09:252015-03-06 14:04
egoitz 
alostale 
immediatemajoralways
closedfixed 
5
 
3.0PR15Q2 
AugustoMauch
Core
No
0026794: Prevent re-starting background processes not finished when starting tomcat
Prevent re-starting backround processes not finished when starting tomcat
When an ad_process_run has a row with status='PRC', when starting tomcat Openbravo tries to execute that process.

This causes in many cases performance problems because the process does not finish.
Performance
related to defect 0027315 closed alostale Slow query related to interrupted background processes running on tomcat startup. 
Issue History
2014-06-05 09:25egoitzNew Issue
2014-06-05 09:25egoitzAssigned To => AugustoMauch
2014-06-05 09:25egoitzModules => Core
2014-06-05 09:25egoitzResolution time => 1402351200
2014-06-05 09:25egoitzTriggers an Emergency Pack => No
2014-10-20 02:26eintelauIssue Monitored: eintelau
2015-01-20 16:48egoitzNote Added: 0073649
2015-02-24 17:03alostaleRelationship addedrelated to 0027315
2015-02-27 12:43hgbotCheckin
2015-02-27 12:43hgbotNote Added: 0075029
2015-03-02 09:38ngarciaIssue Monitored: ngarcia
2015-03-02 10:23alostaleAssigned ToAugustoMauch => alostale
2015-03-02 11:59alostaleNote Added: 0075071
2015-03-02 11:59alostaleSummaryPrevent re-starting backround processes not finished when starting tomcat => Prevent re-starting background processes not finished when starting tomcat
2015-03-02 12:02alostaleNote Added: 0075072
2015-03-02 12:23alostaleReview Assigned To => AugustoMauch
2015-03-02 13:58alostaleTag Attached: Performance
2015-03-02 15:07hgbotCheckin
2015-03-02 15:07hgbotNote Added: 0075093
2015-03-02 15:07hgbotStatusnew => resolved
2015-03-02 15:07hgbotResolutionopen => fixed
2015-03-02 15:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5d6465124256165b25897d0b5c37afde04039453 [^]
2015-03-03 16:09hudsonbotCheckin
2015-03-03 16:09hudsonbotNote Added: 0075125
2015-03-06 14:04AugustoMauchNote Added: 0075247
2015-03-06 14:04AugustoMauchStatusresolved => closed
2015-03-06 14:04AugustoMauchFixed in Version => 3.0PR15Q2

Notes
(0073649)
egoitz   
2015-01-20 16:48   
also with the following configuration on a ad_process_request the tomcat does not start:

STATUS='SCH' and CHANNEL='Direct'

That is not defined manually but randomly on some executions
(0075029)
hgbot   
2015-02-27 12:43   
Repository: erp/mods/com.openbravo.support.test
Changeset: 48e080cf70604834a9666f164e67abe1e1360c04
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Feb 27 12:40:36 2015 +0100
URL: http://code.openbravo.com/erp/mods/com.openbravo.support.test/rev/48e080cf70604834a9666f164e67abe1e1360c04 [^]

added bg process taking long to complete for issue 26794

---
A src-db/database/sourcedata/AD_PROCESS.xml
A src/com/openbravo/support/test/process/DummyBGProcess.java
---
(0075071)
alostale   
2015-03-02 11:59   
channel is set as Direct when processes are executed directly from toolbar button instead of scheduling them
(0075072)
alostale   
2015-03-02 12:02   
Added test suite in TestLink [1]: Platform > Scheduled processes on Tomcat restart.

Before fixing this issue the status of these test cases is:
 * 8052: Fail, process is re-executed
 * 8053: Fail, process is re-executed
 * 8054: OK
 * 8055: OK

[1] https://testlink.openbravo.com/testlink [^]
(0075093)
hgbot   
2015-03-02 15:07   
Repository: erp/devel/pi
Changeset: 5d6465124256165b25897d0b5c37afde04039453
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Mar 02 13:59:01 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5d6465124256165b25897d0b5c37afde04039453 [^]

fixed issue 26794: some bg processes are restarted on Tomcat start

  Processes sheduled to be run immediatelly or executed from a button in the toolbar,
  that were in execution when Tomcat was stopped, were re-started next time Tomcat
  was started again.

  In these 2 cases now the process requests are marked as 'System Restart' not
  rescheduling them again.

---
M src/org/openbravo/scheduling/OBScheduler.java
M src/org/openbravo/scheduling/Process.java
M src/org/openbravo/scheduling/ProcessRequest_data.xsql
---
(0075125)
hudsonbot   
2015-03-03 16:09   
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/f4fc528722d4 [^]
Maturity status: Test
(0075247)
AugustoMauch   
2015-03-06 14:04   
Code reviewed and verified in pi@486e7700e8d0