Project:
| View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | ||||||||
| 0033794 | ||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
| defect | [Openbravo ERP] A. Platform | minor | have not tried | 2016-08-24 14:21 | 2016-08-26 13:21 | |||
| Reporter | shuehner | View Status | public | |||||
| Assigned To | shuehner | |||||||
| Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR16Q4 | |||
| Status | closed | Fix in branch | Fixed in SCM revision | 4dddd6f401c6 | ||||
| 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 | 0033794: Accidental double queries in DataSourceServiceProvider.getDataSourceFromDataSourceName | |||||||
| Description | That function calls .list() twice on same instance leading do sql query run twice. As the filter used is for a field (name) having a unique constraint double .list() usage can be simplified to just .uniqueResult as the case of >1 result rows cannot happen. | |||||||
| Steps To Reproduce | with debugging code from https://issues.openbravo.com/view.php?id=33767 [^] applied run try (erp) and observe debugging output during try-initial-pgsql job Unknwown which exact UI action triggers this special case which is 'get datasourceByName compared to getting it byId. See logic in getRealDataSource for the difference in calling. | |||||||
| Tags | Performance | |||||||
| Attached Files | ||||||||
Relationships [ Relation Graph ]
[ Dependency Graph ]
|
||||||||
|
||||||||
Notes |
|
|
(0089345) hgbot (developer) 2016-08-24 14:24 |
Repository: erp/devel/pi Changeset: 4dddd6f401c6cf36a2aa5af49458abe2f8c5280f Author: Stefan Hühner <stefan.huehner <at> openbravo.com> Date: Wed Aug 24 14:23:41 2016 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/4dddd6f401c6cf36a2aa5af49458abe2f8c5280f [^] Fixed 33794. Avoid double .list() call by using .uniqueResult() instead. Code did check for >1 result rows while reading from obserds_datasource. However as the filter is on the name column and that column has an unique constraint that case of >1 cannot happen. So simplify to just call .uniqueResult() removing both .list() calls. --- M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServiceProvider.java --- |
|
(0089385) caristu (viewer) 2016-08-25 10:52 |
Code reviewed |
|
(0089425) hgbot (developer) 2016-08-26 08:25 |
Repository: erp/devel/pi Changeset: 6914648cfa1df0c0e6a305a83addadaee01b8f22 Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Fri Aug 26 08:24:54 2016 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/6914648cfa1df0c0e6a305a83addadaee01b8f22 [^] related to issue 33794: updated copyright year --- M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServiceProvider.java --- |
|
(0089456) hudsonbot (viewer) 2016-08-26 13:21 |
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/f7253a361e2a [^] Maturity status: Test |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2016-08-24 14:21 | shuehner | New Issue | |
| 2016-08-24 14:21 | shuehner | Assigned To | => platform |
| 2016-08-24 14:21 | shuehner | OBNetwork customer | => No |
| 2016-08-24 14:21 | shuehner | Modules | => Core |
| 2016-08-24 14:21 | shuehner | Triggers an Emergency Pack | => No |
| 2016-08-24 14:21 | shuehner | Tag Attached: Performance | |
| 2016-08-24 14:21 | shuehner | Relationship added | related to 0033767 |
| 2016-08-24 14:24 | hgbot | Checkin | |
| 2016-08-24 14:24 | hgbot | Note Added: 0089345 | |
| 2016-08-24 14:24 | hgbot | Status | new => resolved |
| 2016-08-24 14:24 | hgbot | Resolution | open => fixed |
| 2016-08-24 14:24 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/4dddd6f401c6cf36a2aa5af49458abe2f8c5280f [^] |
| 2016-08-24 14:24 | shuehner | Review Assigned To | => caristu |
| 2016-08-24 15:00 | shuehner | Assigned To | platform => shuehner |
| 2016-08-25 10:52 | caristu | Note Added: 0089385 | |
| 2016-08-25 10:52 | caristu | Status | resolved => closed |
| 2016-08-25 10:52 | caristu | Fixed in Version | => 3.0PR16Q4 |
| 2016-08-26 08:25 | hgbot | Checkin | |
| 2016-08-26 08:25 | hgbot | Note Added: 0089425 | |
| 2016-08-26 13:21 | hudsonbot | Checkin | |
| 2016-08-26 13:21 | hudsonbot | Note Added: 0089456 | |
| Copyright © 2000 - 2009 MantisBT Group |