Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033643Retail ModulesStoreServerpublic2016-08-07 10:292016-09-14 11:26
mtaal 
mtaal 
normalminorhave not tried
closedfixed 
5
 
RR16Q4 
Sandrahuguet
No
0033643: Too many reads of mobile server definition during standard webpos request
Doing a standard webpos request to the server (for example to read products) results in many queries for the same mobile server definition (for the central or current store server). For example see the call stack here [1] which was reported to be called 16 times during one request. Although hibernate should cache the object still many requests seem to be done.


        at org.openbravo.dal.service.OBDal.get(OBDal.java:298)
        at org.openbravo.mobile.core.servercontroller.MobileServerController.getThisServerDefinition(MobileServerController.java:311)
        at org.openbravo.mobile.core.servercontroller.MobileServerController.serverHasTransitioningStatus(MobileServerController.java:283)
Preferably install multi-server but it also shows up for non-multi-server
Enable sql logging
Log into webpos
Cache common values such as the current server offline/online state, the same for the central server
No tags attached.
diff 33643.diff (13,201) 2016-08-07 10:30
https://issues.openbravo.com/file_download.php?file_id=9685&type=bug
Issue History
2016-08-07 10:29mtaalNew Issue
2016-08-07 10:29mtaalAssigned To => mtaal
2016-08-07 10:29mtaalTriggers an Emergency Pack => No
2016-08-07 10:30mtaalFile Added: 33643.diff
2016-08-08 09:28shuehnerIssue Monitored: shuehner
2016-08-31 01:16mtaalTarget VersionRR16Q4 => RR17Q1
2016-08-31 01:16mtaalTarget VersionRR17Q1 =>
2016-09-08 10:00hgbotCheckin
2016-09-08 10:00hgbotNote Added: 0089833
2016-09-08 10:00hgbotStatusnew => resolved
2016-09-08 10:00hgbotResolutionopen => fixed
2016-09-08 10:00hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/46b650105936a4001c6409a74b517c4b65e8173c [^]
2016-09-08 10:07mtaalReview Assigned To => Sandrahuguet
2016-09-14 11:26SandrahuguetNote Added: 0089946
2016-09-14 11:26SandrahuguetStatusresolved => closed
2016-09-14 11:26SandrahuguetFixed in Version => RR16Q4

Notes
(0089833)
hgbot   
2016-09-08 10:00   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 46b650105936a4001c6409a74b517c4b65e8173c
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Sep 08 09:57:56 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/46b650105936a4001c6409a74b517c4b65e8173c [^]

Fixes issue 33643: Too many reads of mobile server definition during standard webpos request
Cache some information to prevent reads, read only status instead of full object

Note: reads of mobileserverdefinition can't be prevented as the system needs to read latest
status of a server from the db

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
(0089946)
Sandrahuguet   
2016-09-14 11:26   
Reviewed and tested