Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033790
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2016-08-24 11:412016-08-25 22:53
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PrioritynormalResolutionfixedFixed in Version3.0PR16Q4
StatusclosedFix in branchFixed in SCM revisionc35e5b050f0b
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033790: Accidental double query in PriceListVersionFilterExpressionName (order lines, product selector dropdown)

DescriptionThat class has double query m_pricelist_version and also is missing a limit 1 so could lead to high mem usage.

Note: Code seems to be very similar or identical to the change reported in issue 33705
Steps To Reproducewith debugging code from https://issues.openbravo.com/view.php?id=33767 [^]

Open Sales Order
create new header
In lines tab
Create new record in grid view
Click on product selector drop down and see debugging code fire
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0033705 closedshuehner Double query in PricelistVersionFilterExpression (product selector) 
related to feature request 0033767 closedplatform Add code to auto-detect 'accidental double query' on same OBQuery or OBCriteria object 
related to defect 0033791 acknowledgedTriage Finance PricelistVersionFilterExpression & PriceListVersionFilterExpressionName are 99% identical 
depends on backport 00338113.0PR16Q3.1 closedaferraz Accidental double query in PriceListVersionFilterExpressionName (order lines, product selector dropdown) 
depends on backport 00338123.0PR16Q2.3 closedaferraz Accidental double query in PriceListVersionFilterExpressionName (order lines, product selector dropdown) 

-  Notes
(0089338)
hgbot (developer)
2016-08-24 11:55

Repository: erp/devel/pi
Changeset: c35e5b050f0baa6289ac1cb8c4b17fac389591c3
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed Aug 24 11:54:52 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c35e5b050f0baa6289ac1cb8c4b17fac389591c3 [^]

Fixed 33790. Avoid double query with .count() + .list(). Add limit 1 to query

Query did .count() + then retrieve 1 record after adding extra order by.

This change removes the count as it only adds extra overhead and directly
does the real .list() query.
As the code only uses single row of result add extra limit 1 to reduce
number of result rows loaded into memory if many match the filter.
Simply code to use .uniqueResult() instead of .list().get(0)

---
M src/org/openbravo/erpCommon/info/PriceListVersionFilterExpressionName.java
---
(0089384)
caristu (developer)
2016-08-25 10:45

Code reviewed
(0089402)
hgbot (developer)
2016-08-25 15:11

Repository: erp/devel/pi
Changeset: d058534c944a8a56a3e1be2d298bb26c22f5b7ff
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Aug 25 15:08:57 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d058534c944a8a56a3e1be2d298bb26c22f5b7ff [^]

Related to issue 33790: Update copyright

---
M src/org/openbravo/erpCommon/info/PriceListVersionFilterExpressionName.java
---
(0089418)
hudsonbot (developer)
2016-08-25 22:53

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/5e50832c9b35 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2016-08-24 11:41 shuehner New Issue
2016-08-24 11:41 shuehner Assigned To => platform
2016-08-24 11:41 shuehner Modules => Core
2016-08-24 11:41 shuehner Triggers an Emergency Pack => No
2016-08-24 11:41 shuehner Tag Attached: Performance
2016-08-24 11:41 shuehner Relationship added related to 0033705
2016-08-24 11:41 shuehner Relationship added related to 0033767
2016-08-24 11:47 shuehner Relationship added related to 0033791
2016-08-24 11:55 hgbot Checkin
2016-08-24 11:55 hgbot Note Added: 0089338
2016-08-24 11:55 hgbot Status new => resolved
2016-08-24 11:55 hgbot Resolution open => fixed
2016-08-24 11:55 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c35e5b050f0baa6289ac1cb8c4b17fac389591c3 [^]
2016-08-24 11:55 shuehner Review Assigned To => caristu
2016-08-24 15:00 shuehner Assigned To platform => shuehner
2016-08-25 10:45 caristu Note Added: 0089384
2016-08-25 10:45 caristu Status resolved => closed
2016-08-25 10:45 caristu Fixed in Version => 3.0PR16Q4
2016-08-25 14:20 aferraz Status closed => new
2016-08-25 14:20 aferraz Resolution fixed => open
2016-08-25 14:20 aferraz Fixed in Version 3.0PR16Q4 =>
2016-08-25 14:25 aferraz Status new => scheduled
2016-08-25 14:26 aferraz Status scheduled => resolved
2016-08-25 14:26 aferraz Fixed in Version => 3.0PR16Q4
2016-08-25 14:26 aferraz Resolution open => fixed
2016-08-25 14:26 aferraz Status resolved => closed
2016-08-25 15:11 hgbot Checkin
2016-08-25 15:11 hgbot Note Added: 0089402
2016-08-25 22:53 hudsonbot Checkin
2016-08-25 22:53 hudsonbot Note Added: 0089418


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker