Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038036
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Retail Modules] StoreServermajorhave not tried2018-03-03 11:372018-03-13 17:44
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisione8697b438f44
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038036: SS in online mode always forward all requests to the CS

DescriptionTo prevent CAP-consistency problems the queries for (transactional) data should happen on the same server in which the data is updated. This means that in online mode all queries/requests from WebPOS should be forwarded to the CS. The WebPOS systems should still go through the SS to ensure that they all go offline at the same time.

In offline mode the WP systems work on the SS. To prevent WP working on an inconsistent system the following cases should be handled:
- going offline with sync errors from CS to SS: in this case SS is inconsistent, the WP are not allowed to work on the SS, a message should be given
- when there are version differences between SS and CS then the user can work through the SS in online mode as all the requests are forwarded to the CS
- the WP systems can work through the SS when it is online and reloading, so reloading is not blocking, only mandatory reloading is blocking
- data pending to be synced from CS to SS is no reason to stay offline. Only data pending to be synced from SS to CS is reason to stay offline

Documentation should be updated to.
Steps To ReproduceInstall multi-server
Try different scenarios:
- basic online
- going offline without sync errors
- going offline with sync errors from CS to SS from the start
- going offline with sync errors from CS to SS occurring after going offline
- going offline and then see if transition to online happens in case CS has sync errors
- going offline and then see if transition to online does not happen in case SS has sync errors
- check that non-mandatory reloading does not block WP in online mode
- check that mandatory reloading does block WP in online mode
- check that version differences does not block WP in online mode
- check that version differences do block WP in offline mode
Proposed SolutionSeveral changes in related code
TagsNo tags attached.
Attached Filesdiff file icon 38036-giftcard-5.diff [^] (502 bytes) 2018-03-13 12:27 [Show Content]
diff file icon 38036-retail-sync-5.diff [^] (46,628 bytes) 2018-03-13 12:27 [Show Content]
diff file icon 38036-replication-5.diff [^] (622 bytes) 2018-03-13 12:27 [Show Content]
diff file icon 38036-mobile-core-5.diff [^] (36,994 bytes) 2018-03-13 12:27 [Show Content]
diff file icon 38036-retail-posterminal-5.diff [^] (6,406 bytes) 2018-03-13 12:28 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0037851 closedmarvintm Request timeout should apply to the whole process, and not just the query 
related to design defect 0038123 closedmtaal API Change: MultiServerJSONProcess/CashupSynchronized 
related to design defect 0038127 closedmtaal Storeserver allow going online even if there are pending data to sync from CS to SS 

-  Notes
(0102966)
mtaal (manager)
2018-03-05 06:20

Note: the resolution of this issue depends on 37851 because 37851 moves the request getreader/getcontent to after the calls to MobileServiceRequestAllowedHandlers
(0103004)
hgbot (developer)
2018-03-06 08:25

Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: e8697b438f443e662b07da6f67535d2d41cbf47e
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Mar 06 08:25:16 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/e8697b438f443e662b07da6f67535d2d41cbf47e [^]

Fixes issue 38036: SS in online mode always forward all requests to the CS
Code to forward to CS in online mode, handle invalid offline case and allow going online in more cases.

- AD_Message: added new text/title for popup in case of an invalid offline
- RetailSynchronizationRequestAllowedHandler: several changes:
> for reload: only stop webpos in case of mandatory reload
> send invalid-offline code if the SS is offline with sync errors when going offline
> forward requests to the CS, added new methods to do that, also handling error cases
- StoreServerVersionHandler: remove code which prevents working of CS and SS are in different versions, in online mode this is allowed
- added new javascript to show invalid offline mode popup
- SyncStatusOnlineTransitionHandler: allow going online also if there are things pending from CS, now only things pending from SS block online
- MobileServerEventHandler: when a mobile server definition is saved then also update the incoming error flag when state of the server is changed to offline

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/retail/storeserver/synchronization/RetailSynchronizationRequestAllowedHandler.java
M src/org/openbravo/retail/storeserver/synchronization/StoreServerVersionHandler.java
M src/org/openbravo/retail/storeserver/synchronization/StoreSynchronizationComponentProvider.java
M src/org/openbravo/retail/storeserver/synchronization/SyncStatusOnlineTransitionHandler.java
M src/org/openbravo/retail/storeserver/synchronization/eventhandler/MobileServerEventHandler.java
A web/org.openbravo.retail.storeserver.synchronization/js/responseCallbackHandler.js
---
(0103005)
mtaal (manager)
2018-03-06 08:27

Tests done:
- basic online --> search product, cash man, create BP create ticket, cashup, checked also syncing back to SS
- going offline without sync errors --> offline mode with search product, create ticket, cashup, check sync back to CS
- going offline with sync errors from CS to SS from the start
- going offline with sync errors from CS to SS occurring after going offline
- going offline and then see if transition to online happens in case CS has sync errors
- going offline and then see if transition to online does not happen in case SS has sync errors
- check that non-mandatory reloading does not block WP in online mode
- check that mandatory reloading does block WP in online mode
- check that version differences does not block WP in online mode
- check that version differences do block WP in offline mode
(0103006)
mtaal (manager)
2018-03-06 08:28

Mobile core push:
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d880fc5e1aea [^]

Related to issue: 38036: SS in online mode always forward all requests to the CS
Changes to server controller package of mobile core to facilitate forwarding calls from SS to CS in online mode.

- new column added to mobile server definition table to keep track if there were incoming sync errors when going offline
- added comment to mobileservice for change of related issue which moves the getRequestContent to after the calls to MobileServiceRequestHandler
- moved constants from the MultiServerJSONProcess to the MobileServerRequestExecutor
- In MultiServerJSONProcess: corrected a call to OBMOBCUtils.createSimpleErrorJson to send the message code instead of the text
- SynchronizedServerProcessCaller: use new constants
(0103192)
hgbot (developer)
2018-03-13 15:38

Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: 04080e5346c296e1ffff8d3c2b5f545dcdb10672
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Mar 13 15:37:58 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/04080e5346c296e1ffff8d3c2b5f545dcdb10672 [^]

Related to issue 38036: SS in online mode always forward all requests to the CS
Remove deprecated method usage

---
M src/org/openbravo/retail/giftcards/FindGiftCard.java
---
(0103193)
hgbot (developer)
2018-03-13 15:38

Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: bb37f64fe7c1c549ac809a4dab3f1fdc2d55b2c7
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Mar 13 15:38:41 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/bb37f64fe7c1c549ac809a4dab3f1fdc2d55b2c7 [^]

Related to issue 38036: SS in online mode always forward all requests to the CS
Removed non-used method

---
M src/org/openbravo/replication/symmetricds/diagnosis/RemoteStoreServerDiagnosisProcess.java
---
(0103194)
hgbot (developer)
2018-03-13 15:39

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 941e0b9681656fb24def0f215c6a2712edfbad58
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Mar 13 15:39:39 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/941e0b9681656fb24def0f215c6a2712edfbad58 [^]

Related to issue 38036: SS in online mode always forward all requests to the CS
Synchronized Cashup is not needed anymore as in online mode all calls are done
to CS through SS.

---
M web/org.openbravo.retail.posterminal/js/utils/cashUpReportUtils.js
R src/org/openbravo/retail/posterminal/master/CashupSynchronized.java
---
(0103195)
hgbot (developer)
2018-03-13 15:44

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: b0120b99cc374e522c0bd067e89fec1d4362bea0
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Mar 13 15:44:19 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b0120b99cc374e522c0bd067e89fec1d4362bea0 [^]

Related to issue 38036: SS in online mode always forward all requests to the CS

- Added description to new element record
- JSONProcessSimple: transition code has been moved to the RetailSynchronizedRequestHandler
- MobileService: change the request allowed handler concept to a more general MobileServiceRequestHandler
- MobileServerRequestExecutor: formatting changes
- MultiServerJSONProcess: large clean up as the handling of online/offline calls are now done through the
MobileServiceRequestHandler. Only the code related to creating import entries and handling duplicate requests remains.
Removed code which is not used anymore.
- SynchronizedServerProcessCaller: formatting changes

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src/org/openbravo/mobile/core/process/JSONProcessSimple.java
M src/org/openbravo/mobile/core/process/MobileService.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
M src/org/openbravo/mobile/core/servercontroller/MultiServerJSONProcess.java
M src/org/openbravo/mobile/core/servercontroller/SynchronizedServerProcessCaller.java
---
(0103196)
hgbot (developer)
2018-03-13 15:50

Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 6885b3bb0eebe473d7f44e868c7fdc7b091ba1cc
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Mar 13 15:50:00 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/6885b3bb0eebe473d7f44e868c7fdc7b091ba1cc [^]

Related to issue 38036: SS in online mode always forward all requests to the CS

- RecomputeVersionModuleHandler: removed non used method
- RetailSynchronizationRequestAllowedHandler renamed to RetailSynchronizationRequestHandler
- added handling of transitioning and other states in RetailSynchronizationRequestHandler
- RetrieveServerVersionStatus, StoreSynchronizationComponentProvider: formatting changes
- SyncStatusOnlineTransitionHandler: check for importentries sync back from CS-->SS before going online
- MobileServerEventHandler: updated sql and formatting changes, only set offline-error-flag when it needs to be changed

---
M src/org/openbravo/retail/storeserver/synchronization/RecomputeVersionModuleHandler.java
M src/org/openbravo/retail/storeserver/synchronization/RetrieveServerVersionStatus.java
M src/org/openbravo/retail/storeserver/synchronization/StoreServerVersionHandler.java
M src/org/openbravo/retail/storeserver/synchronization/StoreSynchronizationComponentProvider.java
M src/org/openbravo/retail/storeserver/synchronization/SyncStatusOnlineTransitionHandler.java
M src/org/openbravo/retail/storeserver/synchronization/eventhandler/MobileServerEventHandler.java
A src/org/openbravo/retail/storeserver/synchronization/RetailSynchronizationRequestHandler.java
R src/org/openbravo/retail/storeserver/synchronization/RetailSynchronizationRequestAllowedHandler.java
---
(0103199)
AugustoMauch (manager)
2018-03-13 16:19

Code reviewed and verified
(0103217)
mtaal (manager)
2018-03-13 17:44

Updated the image and docs here:
http://wiki.openbravo.com/wiki/Retail:Store_Server#Online_.26_Offline_concepts_of_Store_Servers [^]

- Issue History
Date Modified Username Field Change
2018-03-03 11:37 mtaal New Issue
2018-03-03 11:37 mtaal Assigned To => mtaal
2018-03-03 11:37 mtaal Triggers an Emergency Pack => No
2018-03-05 06:17 mtaal Relationship added depends on 0037851
2018-03-05 06:17 mtaal Relationship deleted depends on 0037851
2018-03-05 06:17 mtaal Relationship added related to 0037851
2018-03-05 06:20 mtaal Note Added: 0102966
2018-03-05 11:49 mtaal File Added: 38036-store-sync.diff
2018-03-05 11:49 mtaal File Added: 38036-mobile-core.diff
2018-03-06 08:25 hgbot Checkin
2018-03-06 08:25 hgbot Note Added: 0103004
2018-03-06 08:25 hgbot Status new => resolved
2018-03-06 08:25 hgbot Resolution open => fixed
2018-03-06 08:25 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/e8697b438f443e662b07da6f67535d2d41cbf47e [^]
2018-03-06 08:25 mtaal Review Assigned To => AugustoMauch
2018-03-06 08:27 mtaal Note Added: 0103005
2018-03-06 08:28 mtaal Note Added: 0103006
2018-03-09 22:13 mtaal File Added: replication-38036-2.diff
2018-03-09 22:13 mtaal File Added: storeserver-sync-38036-2.diff
2018-03-09 22:13 mtaal File Added: mobile-core-38036-2.diff
2018-03-10 10:24 mtaal File Deleted: 38036-store-sync.diff
2018-03-10 10:24 mtaal File Deleted: 38036-mobile-core.diff
2018-03-10 10:24 mtaal File Deleted: replication-38036-2.diff
2018-03-10 10:25 mtaal File Deleted: storeserver-sync-38036-2.diff
2018-03-10 10:25 mtaal File Deleted: mobile-core-38036-2.diff
2018-03-10 10:25 mtaal File Added: gift-cards-38036-1.diff
2018-03-10 10:26 mtaal File Added: mobile-core-38036-4.diff
2018-03-10 10:26 mtaal File Added: retail-sync-1.diff
2018-03-10 10:27 mtaal File Added: replication-1.diff
2018-03-13 12:27 mtaal File Deleted: gift-cards-38036-1.diff
2018-03-13 12:27 mtaal File Deleted: mobile-core-38036-4.diff
2018-03-13 12:27 mtaal File Deleted: retail-sync-1.diff
2018-03-13 12:27 mtaal File Deleted: replication-1.diff
2018-03-13 12:27 mtaal File Added: 38036-giftcard-5.diff
2018-03-13 12:27 mtaal File Added: 38036-retail-sync-5.diff
2018-03-13 12:27 mtaal File Added: 38036-replication-5.diff
2018-03-13 12:27 mtaal File Added: 38036-mobile-core-5.diff
2018-03-13 12:28 mtaal File Added: 38036-retail-posterminal-5.diff
2018-03-13 15:38 hgbot Checkin
2018-03-13 15:38 hgbot Note Added: 0103192
2018-03-13 15:38 hgbot Checkin
2018-03-13 15:38 hgbot Note Added: 0103193
2018-03-13 15:39 hgbot Checkin
2018-03-13 15:39 hgbot Note Added: 0103194
2018-03-13 15:44 hgbot Checkin
2018-03-13 15:44 hgbot Note Added: 0103195
2018-03-13 15:50 hgbot Checkin
2018-03-13 15:50 hgbot Note Added: 0103196
2018-03-13 16:19 AugustoMauch Note Added: 0103199
2018-03-13 16:19 AugustoMauch Status resolved => closed
2018-03-13 17:09 mtaal Relationship added related to 0038123
2018-03-13 17:44 mtaal Note Added: 0103217
2018-03-13 19:55 mtaal Relationship added related to 0038127


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker