Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033141Retail ModulesWeb POSpublic2016-06-05 23:512016-06-24 10:07
mtaal 
mtaal 
normalmajorhave not tried
closedfixed 
5
 
RR16Q3 
migueldejuana
No
0033141: Change transaction mode to try server one by one and not broadcast the transaction
The current transaction mode broadcasts a message to all eligible servers. This can be okay and robust but gives rise to all kinds of race conditions when replicating transactions from one server to another.

A more safe/better controllable approach seems to be to only send a transaction to the first eligible server.

This also fits better to the concept of offline mode which corresponds to no server being available for a message. This is better than the current approach where we say that if one main server is not reachable that the user is in offline mode.
Create an environment with 2 servers
Create a ticket and check that it is broadcast to both servers at the same time

Only send a message to the first online server which can receive it. If a server is not online then retry it several times and then retry a next available server.

The message stays in the database until it can be send to at least one of the servers.
No tags attached.
Issue History
2016-06-05 23:51mtaalNew Issue
2016-06-05 23:51mtaalAssigned To => mtaal
2016-06-05 23:51mtaalTriggers an Emergency Pack => No
2016-06-10 15:43hgbotCheckin
2016-06-10 15:43hgbotNote Added: 0087174
2016-06-10 15:43hgbotStatusnew => resolved
2016-06-10 15:43hgbotResolutionopen => fixed
2016-06-10 15:43hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fb2636899313df3c617c64202fd9afbd8c54b896 [^]
2016-06-20 16:20mtaalReview Assigned To => migueldejuana
2016-06-24 10:07migueldejuanaNote Added: 0087881
2016-06-24 10:07migueldejuanaStatusresolved => closed

Notes
(0087174)
hgbot   
2016-06-10 15:43   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: fb2636899313df3c617c64202fd9afbd8c54b896
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Jun 10 15:43:16 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fb2636899313df3c617c64202fd9afbd8c54b896 [^]

Fixes issue 33141: Change transaction mode to try server one by one and not broadcast the transaction
Use fail over mode for transactional message, keep it in the database to retry, show offline always if there is at least one message to sync irrespective of server.

---
M web/org.openbravo.mobile.core/source/component/dialog/ob-modalitemstosync.js
M web/org.openbravo.mobile.core/source/component/dialog/ob-modalmodelstosync.js
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
M web/org.openbravo.mobile.core/source/model/ob-message.js
---
(0087881)
migueldejuana   
2016-06-24 10:07   
Tested and reviewed