Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040501Retail ModulesStoreServerpublic2019-04-01 13:442019-04-01 19:46
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
 
No
0040501: The status of the central server entry in Mobile Servers is sometimes <> ON, and that triggers unneeded transitions to online
Recently we saw in the log of a central server that it transitioned to online. This does not make sense, since the status of the central server in the Mobile Server window should always be ONLINE, only the store servers can have other status.

This unneeded transition to online can be problematic, since a transition to online hook can assume that it will be only executed on a store server.
The following log was found on the log file of a central server:

cdb72c84 2019-03-26 22:42:12,580 [DefaultQuartzScheduler_Worker-9] INFO org.openbravo.mobile.core.servercontroller.MobileServerController - Transition to online called
cdb72c84 2019-03-26 22:42:12,617 [TransitionToOnlineThread] INFO org.openbravo.mobile.core.servercontroller.MobileServerController - Checking if transition to online can start
cdb72c84 2019-03-26 22:42:12,620 [TransitionToOnlineThread] INFO org.openbravo.mobile.core.servercontroller.MobileServerController - Checking if transition to online can start
cdb72c84 2019-03-26 22:42:20,477 [TransitionToOnlineThread] INFO org.openbravo.mobile.core.servercontroller.MobileServerController - Starting transition to online
cdb72c84 2019-03-26 22:42:20,488 [TransitionToOnlineThread] INFO org.openbravo.mobile.core.servercontroller.MobileServerController - Doing transition to online
cdb72c84 2019-03-26 22:42:24,147 [TransitionToOnlineThread] INFO org.openbravo.mobile.core.servercontroller.MobileServerController - All handlers were ready to go online, going online


To try to reproduce it:
- Run a query in a store server and update the entry for the central server in the obmobc_server_definition table, setting its status to 'OFF'.
- Check that the change is synchronized to the central server. It will be there only a brief amount of time, since the store server will update the status to the central server to 'ON' quickly. But if sym_data is checked in the central server, it will be clear that the status change was synchronized.
No tags attached.
Issue History
2019-04-01 13:44AugustoMauchNew Issue
2019-04-01 13:44AugustoMauchAssigned To => AugustoMauch
2019-04-01 13:44AugustoMauchTriggers an Emergency Pack => No
2019-04-01 17:02hgbotCheckin
2019-04-01 17:02hgbotNote Added: 0110948
2019-04-01 17:04hgbotCheckin
2019-04-01 17:04hgbotNote Added: 0110949
2019-04-01 17:04hgbotStatusnew => resolved
2019-04-01 17:04hgbotResolutionopen => fixed
2019-04-01 17:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5079e270d04de52701cdd74f7c4c53ba1c690d14 [^]
2019-04-01 19:46mtaalNote Added: 0110951
2019-04-01 19:46mtaalStatusresolved => closed

Notes
(0110948)
hgbot   
2019-04-01 17:02   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 73937bfed5c704b2394b06aabaef0d9a4d9c38b9
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Apr 01 16:44:42 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/73937bfed5c704b2394b06aabaef0d9a4d9c38b9 [^]

Related with issue 40501: SS should not sync to CS changes done to CS mobile row

When in a store server there is a change in the obmobc_server_definition table, in the central server
row, that change should not be synchronized to the central server.

For instance, a store server will change the status of the central server row to OFFLINE when it loses
connectivity. It does not makem sense to synchronize that change to the central server.

---
M src-db/database/sourcedata/STRSYNC_SYNCHRONIZEDTABLE.xml
M src/org/openbravo/retail/storeserver/synchronization/router/MobileServerRouter.java
---
(0110949)
hgbot   
2019-04-01 17:04   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 5079e270d04de52701cdd74f7c4c53ba1c690d14
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Apr 01 17:04:04 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5079e270d04de52701cdd74f7c4c53ba1c690d14 [^]

Fixes issue 40501: Central server should never transition to online/offline

The previous changeset [1] prevented accidentally changing the status of the central server
to OFFLINE.

Now that that part is fixed, this changeset makes sure the central server never tries to transition
to online or offline.

[1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/73937bfed5c704b2394b06aabaef0d9a4d9c38b9 [^]

---
M src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
(0110951)
mtaal   
2019-04-01 19:46   
reviewed