Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0033627 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2016-08-04 17:20 | 2016-08-30 10:07 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR16Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 2f8cbe2f7611 | ||||
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 | alostale | |||||||
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 | 0033627: debug call in OBCriteria.count does trigger extra db query in some case | |||||||
Description | Given the following code: final OBCriteria<Locator> locators = OBDal.getInstance().createCriteria(Locator.class); locators.add(Restrictions.eq(Locator.PROPERTY_ACTIVE, true)); locators.add(Restrictions.eq(Locator.PROPERTY_WAREHOUSE, shipment.getWarehouse())); if (locators.count() == 1) { with 'shipment.getWarehouse() being a hibernate proxy (not initialized) Then this debug statement inside OBCriteria.count() log.debug("Counting using criteria " + toString()); Triggers init + sql db read of m_warehouse which is not really required. | |||||||
Steps To Reproduce | i.e. using POS OrderLoader which contains the above code (in some functional flow). It maybe easier to reproduce in some small isolated test-case. | |||||||
Proposed Solution | Wrap .debug in isDebugEnabled() to avoid calling toString() on it. | |||||||
Tags | Performance | |||||||
Attached Files | ![]() | |||||||
![]() |
|||||||||
|
![]() |
|
(0088823) shuehner (administrator) 2016-08-04 17:22 |
Mark as related as this issue here is trigger by the code change in 33139. So after fixing 33139 this bug here does not trigger anymore in that occasion (as the count call is removed). |
(0088868) hgbot (developer) 2016-08-07 16:25 |
Repository: erp/devel/pi Changeset: 2f8cbe2f7611ce4b89fe72e273a9c127c93bc952 Author: Martin Taal <martin.taal <at> openbravo.com> Date: Sun Aug 07 16:24:38 2016 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/2f8cbe2f7611ce4b89fe72e273a9c127c93bc952 [^] Fixes issue 33627: debug call in OBCriteria.count does trigger extra db query in some case Wrap log.debug in if statement --- M src/org/openbravo/dal/service/OBCriteria.java --- |
(0089043) hudsonbot (viewer) 2016-08-11 18:40 |
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/edaa05b1fb18 [^] Maturity status: Test |
(0089531) alostale (viewer) 2016-08-30 10:07 |
code reviewed + tested |
![]() |
|||
Date Modified | Username | Field | Change |
2016-08-04 17:20 | shuehner | New Issue | |
2016-08-04 17:20 | shuehner | Assigned To | => platform |
2016-08-04 17:20 | shuehner | OBNetwork customer | => No |
2016-08-04 17:20 | shuehner | Modules | => Core |
2016-08-04 17:20 | shuehner | Triggers an Emergency Pack | => No |
2016-08-04 17:21 | shuehner | Tag Attached: Performance | |
2016-08-04 17:21 | shuehner | Relationship added | related to 0033139 |
2016-08-04 17:22 | shuehner | Note Added: 0088823 | |
2016-08-04 17:22 | shuehner | File Added: 33627.diff | |
2016-08-07 10:08 | mtaal | Assigned To | platform => mtaal |
2016-08-07 16:25 | hgbot | Checkin | |
2016-08-07 16:25 | hgbot | Note Added: 0088868 | |
2016-08-07 16:25 | hgbot | Status | new => resolved |
2016-08-07 16:25 | hgbot | Resolution | open => fixed |
2016-08-07 16:25 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/2f8cbe2f7611ce4b89fe72e273a9c127c93bc952 [^] |
2016-08-08 10:20 | mtaal | Review Assigned To | => alostale |
2016-08-11 18:40 | hudsonbot | Checkin | |
2016-08-11 18:40 | hudsonbot | Note Added: 0089043 | |
2016-08-30 10:07 | alostale | Note Added: 0089531 | |
2016-08-30 10:07 | alostale | Status | resolved => closed |
2016-08-30 10:07 | alostale | Fixed in Version | => 3.0PR16Q4 |
Copyright © 2000 - 2009 MantisBT Group |