Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033770Openbravo ERPA. Platformpublic2016-08-23 17:012022-02-01 08:05
shuehner 
Triage Platform Base 
highminorhave not tried
acknowledgedopen 
5
 
 
Core
No
0033770: ModuleManagement install from local obx triggers accidental 4* load of ad_module_dependency
The flow of installing packs from local obx file looks for ad_module_dependency information in the local database.

That code calls .list() 4 times on the same OBCriteria instances running the sql query 4 times which should be avoided.
Use debugging code from:
https://issues.openbravo.com/view.php?id=33767 [^]

And follow flow of ci job int-dummy-pgsql.

Following local hack is sufficient to produce the issue.
Download latest org.openbravo.v3 module ci test obx from forge (i.e. minor version 29874
Edit local version to be 29874-1 for core module + org.openbravo.v3 module in database
run export.database to work around 'local changes' check in mmc
Now in MMC install from local file pointing to downloaded v3 obx

Observe the extra .list() calls with the debugging code mentioned above.
Performance
related to feature request 0033767 closed platform Add code to auto-detect 'accidental double query' on same OBQuery or OBCriteria object 
diff 33770.diff (1,257) 2016-08-23 17:03
https://issues.openbravo.com/file_download.php?file_id=9746&type=bug
Issue History
2016-08-23 17:01shuehnerNew Issue
2016-08-23 17:01shuehnerAssigned To => platform
2016-08-23 17:01shuehnerModules => Core
2016-08-23 17:01shuehnerTriggers an Emergency Pack => No
2016-08-23 17:03shuehnerNote Added: 0089314
2016-08-23 17:03shuehnerRelationship addedrelated to 0033767
2016-08-23 17:03shuehnerFile Added: 33770.diff
2016-08-23 17:10shuehnerTag Attached: Performance
2016-08-29 09:20alostaleStatusnew => acknowledged
2016-12-01 14:05alostalePrioritynormal => urgent
2016-12-01 14:05alostalePriorityurgent => high
2022-02-01 08:05alostaleAssigned Toplatform => Triage Platform Base

Notes
(0089314)
shuehner   
2016-08-23 17:03   
Extra notes:
- There is no unique constraint in db on the combination of filters used in the query
- No limit is set in the query
- no ordering is set in the query
- but code only uses .get(0) result

So assuming multiple result rows for that filter are possible the result is undefined (random ordering as per sql spec when not specifying order by in the query)