Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0037677 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2018-01-19 10:07 | 2018-02-22 18:18 | |||
Reporter | AugustoMauch | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR18Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | a2cba155ca8f | ||||
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 | caristu | |||||||
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 | 0037677: No need to check if ad_context_info table exists before creating it | |||||||
Description | The SessionInfo.initDB method creates the ad_context_info temporary table in postgres [1]. Before creating it, it consults the catalog to check if the table has already been created. This method used to be called each time a connection was borrowed from the pool, but this behaviour changed in this issue [2], now it is invoked only when a physical connection is created in the database. This makes unnecessary to check if the temporary table has been created. In a high concurrency environment, the query to check if the table exists took longer than 40 seconds, in a peak where lots of connections were created in a short time span. [1] https://code.openbravo.com/erp/devel/pi/file/tip/src-core/src/org/openbravo/database/SessionInfo.java#l123 [^] [2] https://issues.openbravo.com/view.php?id=33441 [^] | |||||||
Steps To Reproduce | - Write log before this line [1], printing the result of the query. It will always return 0, making the query unnecessary. [1] https://code.openbravo.com/erp/devel/pi/file/tip/src-core/src/org/openbravo/database/SessionInfo.java#l128 [^] | |||||||
Tags | Performance | |||||||
Attached Files | ||||||||
![]() |
|||||||||||||||
|
![]() |
|
(0102116) hgbot (developer) 2018-02-01 13:13 |
Repository: erp/devel/pi Changeset: a2cba155ca8ff6c03009eead9a94a21e7c78823a Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Fri Jan 19 11:58:05 2018 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/a2cba155ca8ff6c03009eead9a94a21e7c78823a [^] Fixes issue 37677: Dont check if ad_context_info table exists before creating it Now, if the pool is used, the query to check if the ad_context_info table already exists will not be done. This check can be skipped because if the pool is used, the initDB method will only be called when a new physical connection is created, and in that case the temporary table is garanteed not to exist. This pool instance check is needed to keep supporting using pools other than org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool (or none at al), but in those cases the query to check if the ad_context_info table exists will still be performed. --- M src-core/src/org/openbravo/database/SessionInfo.java --- |
(0102145) caristu (viewer) 2018-02-02 10:08 |
Code reviewed. |
(0102705) hudsonbot (viewer) 2018-02-22 18:18 |
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/980a6ad5bbf5 [^] Maturity status: Test |
![]() |
|||
Date Modified | Username | Field | Change |
2018-01-19 10:07 | AugustoMauch | New Issue | |
2018-01-19 10:07 | AugustoMauch | Assigned To | => AugustoMauch |
2018-01-19 10:07 | AugustoMauch | OBNetwork customer | => No |
2018-01-19 10:07 | AugustoMauch | Modules | => Core |
2018-01-19 10:07 | AugustoMauch | Triggers an Emergency Pack | => No |
2018-01-19 10:16 | AugustoMauch | Relationship added | related to 0033441 |
2018-01-19 10:17 | AugustoMauch | Steps to Reproduce Updated | View Revisions |
2018-01-19 10:28 | AugustoMauch | Relationship added | related to 0037681 |
2018-01-29 10:32 | alostale | Tag Attached: Performance | |
2018-02-01 13:13 | hgbot | Checkin | |
2018-02-01 13:13 | hgbot | Note Added: 0102116 | |
2018-02-01 13:13 | hgbot | Status | new => resolved |
2018-02-01 13:13 | hgbot | Resolution | open => fixed |
2018-02-01 13:13 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/a2cba155ca8ff6c03009eead9a94a21e7c78823a [^] |
2018-02-01 13:14 | AugustoMauch | Review Assigned To | => caristu |
2018-02-02 10:08 | caristu | Note Added: 0102145 | |
2018-02-02 10:08 | caristu | Status | resolved => closed |
2018-02-02 10:08 | caristu | Fixed in Version | => 3.0PR18Q2 |
2018-02-22 18:18 | hudsonbot | Checkin | |
2018-02-22 18:18 | hudsonbot | Note Added: 0102705 |
Copyright © 2000 - 2009 MantisBT Group |