Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033789Openbravo ERPA. Platformpublic2016-08-24 11:042016-08-26 13:21
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0PR16Q4 
caristu
Core
No
0033789: Accidental double queries in org.openbravo.services.db.CallProcess
One of the call method in this class:

  public ProcessInstance call(String processName, String recordID, Map<String, String> parameters,
      Boolean doCommit) {

calls .list() twice on same OBCriteria running sql query twice also.
with debugging code from https://issues.openbravo.com/view.php?id=33767 [^]
run try-retail
Then the try-ret-modules job will trigger that flow

2016-08-24 05:09:51,572 [ajp-bio-127.0.0.1-8009-exec-3] WARN org.openbravo.dal.service.OBCriteria - Extra search done on OBQuery instance:
java.lang.Throwable
        at org.openbravo.dal.service.OBCriteria.checkDoubleSearch(OBCriteria.java:92)
        at org.openbravo.dal.service.OBCriteria.list(OBCriteria.java:115)
        at org.openbravo.service.db.CallProcess.call(CallProcess.java:93)
        at org.openbravo.service.db.CallProcess.call(CallProcess.java:247)
        at org.openbravo.mobile.warehouse.goodmovement.ProcessDocument.saveRecord(ProcessDocument.java:93)
        at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:198)
        at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:155)
        at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:87)
        at org.openbravo.mobile.core.process.JSONProcessSimple.exec(JSONProcessSimple.java:59)
Performance
related to feature request 0033767 closed platform Add code to auto-detect 'accidental double query' on same OBQuery or OBCriteria object 
Issue History
2016-08-24 11:04shuehnerNew Issue
2016-08-24 11:04shuehnerAssigned To => platform
2016-08-24 11:04shuehnerModules => Core
2016-08-24 11:04shuehnerTriggers an Emergency Pack => No
2016-08-24 11:04shuehnerRelationship addedrelated to 0033767
2016-08-24 11:05shuehnerTag Attached: Performance
2016-08-24 11:07shuehnerNote Added: 0089336
2016-08-24 11:10hgbotCheckin
2016-08-24 11:10hgbotNote Added: 0089337
2016-08-24 11:10hgbotStatusnew => resolved
2016-08-24 11:10hgbotResolutionopen => fixed
2016-08-24 11:10hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3d8d5b58f0ec6170acc87c08280947c2ef5f3c25 [^]
2016-08-24 11:10shuehnerReview Assigned To => caristu
2016-08-24 15:00shuehnerAssigned Toplatform => shuehner
2016-08-25 10:45caristuNote Added: 0089383
2016-08-25 10:45caristuStatusresolved => closed
2016-08-25 10:45caristuFixed in Version => 3.0PR16Q4
2016-08-26 08:27hgbotCheckin
2016-08-26 08:27hgbotNote Added: 0089426
2016-08-26 13:21hudsonbotCheckin
2016-08-26 13:21hudsonbotNote Added: 0089457

Notes
(0089336)
shuehner   
2016-08-24 11:07   
Probably this test-case trigger the topic:
org.openbravo.test.mobile.retail.extmodules.selenium.tests.warehouse.GoodsMovementTest.test

As the stacktrace above seems to point to this module.
(0089337)
hgbot   
2016-08-24 11:10   
Repository: erp/devel/pi
Changeset: 3d8d5b58f0ec6170acc87c08280947c2ef5f3c25
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed Aug 24 11:08:58 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3d8d5b58f0ec6170acc87c08280947c2ef5f3c25 [^]

Fixed 33789. Avoid accidental double query by not calling .list() twice

---
M src/org/openbravo/service/db/CallProcess.java
---
(0089383)
caristu   
2016-08-25 10:45   
Code reviewed
(0089426)
hgbot   
2016-08-26 08:27   
Repository: erp/devel/pi
Changeset: 137deeaaeb7b74ddf2804ea184a747c56636ae2f
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Aug 26 08:26:43 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/137deeaaeb7b74ddf2804ea184a747c56636ae2f [^]

related to issue 33789: updated copyright year

---
M src/org/openbravo/service/db/CallProcess.java
---
(0089457)
hudsonbot   
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