Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0037677 | Openbravo ERP | A. Platform | public | 2018-01-19 10:07 | 2018-02-22 18:18 |
|
Reporter | AugustoMauch | |
Assigned To | AugustoMauch | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR18Q2 | |
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 [^] |
Proposed Solution | |
Additional Information | |
Tags | Performance |
Relationships | related to | defect | 0033441 | 3.0PR16Q4 | closed | NaroaIriarte | query to check if ad_context_info exists executed once per request | related to | feature request | 0037681 | | closed | AugustoMauch | No need to create the ad_context_info table if audit trail is not active, remove Update Audit Trail Infrastructure. |
|
Attached Files | |
|
Issue History |
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 | bug_revision_view_page.php?rev_id=16559#r16559 |
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 | |