Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0027315 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2014-08-12 14:02 | 2015-03-06 13:16 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR15Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 03b252d94692 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | AugustoMauch | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0027315: Slow query related to interrupted background processes running on tomcat startup. | |||||||
Description | The following query is run on tomcat startup and seems to cause lots of I/O. LOG: duration: 17306.911 ms execute <unnamed>: UPDATE AD_PROCESS_RUN SET END_TIME=NOW(),STATUS='SYR' WHERE END_TIME IS NULL It seems that this query is supposed to mark processes interrupted by the last tomcat shutdown with status=SYR. by finding such processes with the END_TIME is null filter. However the query as such triggers a sequential scan of ad_process_run which can be very big in some cases. However that table does have an existing index on status column. It should be functionally possible to add a status filter similar to status=running or (status <> complete && status <> error) which should use that index and skip scanning most of the table. | |||||||
Steps To Reproduce | - | |||||||
Tags | Performance | |||||||
Attached Files | ||||||||
![]() |
|||||||||||||||
|
![]() |
|
(0075073) hgbot (developer) 2015-03-02 12:23 |
Repository: erp/devel/pi Changeset: 03b252d94692423fdc89e455fad1ba1a91278671 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Mon Mar 02 12:22:20 2015 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/03b252d94692423fdc89e455fad1ba1a91278671 [^] fixed issue 27315: Slow query for interrupted bg processes on tomcat start On Tomcat start, background processes that were in execution are updated to change their status from 'Processing' to 'System Restart'. This query does a sequential scan on ad_process_run which can be slow if there are many records. This fix: * Adds a filter on STATUS column which is indexed. The amount of processes in PRC status is expected to be small (specially comapring with the total rows in this table), so indexed scan should be used instead of sequential scan. * Adds log to inform about the number of executions marked as 'System Restart' --- M src/org/openbravo/base/OBSchedulerInitializerListener.java --- |
(0075111) hudsonbot (viewer) 2015-03-02 20:31 |
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/9d659cacae03 [^] Maturity status: Test |
(0075244) AugustoMauch (administrator) 2015-03-06 13:16 |
Code reviewed and verified in pi@486e7700e8d0 |
![]() |
|||
Date Modified | Username | Field | Change |
2014-08-12 14:02 | shuehner | New Issue | |
2014-08-12 14:02 | shuehner | Assigned To | => AugustoMauch |
2014-08-12 14:02 | shuehner | OBNetwork customer | => No |
2014-08-12 14:02 | shuehner | Modules | => Core |
2014-08-12 14:02 | shuehner | Triggers an Emergency Pack | => No |
2014-08-12 14:02 | shuehner | Tag Attached: Performance | |
2015-02-24 17:03 | alostale | Relationship added | related to 0026794 |
2015-02-24 17:03 | alostale | Status | new => acknowledged |
2015-02-24 17:03 | alostale | Priority | normal => high |
2015-02-24 17:04 | alostale | Priority | high => urgent |
2015-03-02 09:38 | ngarcia | Issue Monitored: ngarcia | |
2015-03-02 12:11 | alostale | Assigned To | AugustoMauch => alostale |
2015-03-02 12:11 | alostale | Review Assigned To | => AugustoMauch |
2015-03-02 12:14 | alostale | Relationship added | related to 0021215 |
2015-03-02 12:23 | hgbot | Checkin | |
2015-03-02 12:23 | hgbot | Note Added: 0075073 | |
2015-03-02 12:23 | hgbot | Status | acknowledged => resolved |
2015-03-02 12:23 | hgbot | Resolution | open => fixed |
2015-03-02 12:23 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/03b252d94692423fdc89e455fad1ba1a91278671 [^] |
2015-03-02 20:31 | hudsonbot | Checkin | |
2015-03-02 20:31 | hudsonbot | Note Added: 0075111 | |
2015-03-06 13:16 | AugustoMauch | Note Added: 0075244 | |
2015-03-06 13:16 | AugustoMauch | Status | resolved => closed |
2015-03-06 13:16 | AugustoMauch | Fixed in Version | => 3.0PR15Q2 |
Copyright © 2000 - 2009 MantisBT Group |