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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039260
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Retail Modules] StoreServerminorhave not tried2018-09-11 09:122018-11-28 09:18
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisione48a21d0eb44
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

0039260: Send delta age in ping, check delta before going offline

DescriptionWhen sending the ping from cs to ss also send the delta age. Store it in the mobile server definition.

When going offline determine if the offline state is valid by checking the age of the delta. Make this age limit configurable, default to 5 minutes. If the delta is old then treat the situation the same as with a sync error: invalid offline which is shown to the user.

There is a risk that the store can not go offline after that as the delta is too large. So we will introduce a check procedure which checks the age of the batches in CS. If it is too old we do not allow going offline or transition to online.
Steps To ReproduceRun multi-server
Simulate offline/online and max age

To test the change:
- set the new preference to a 1 minute or so
- force a sync error (by creating a unit 'c1' in the store and then in central
- wait a few minutes
- then stop the central server
- the webpos will not go offline as the delta age is too old

Additional test
- force the offline by changing the status in the database directly in the store server
- notice that the system reports an illegal offline mode and shows a message
Proposed SolutionNew feature, add a preference to control the max age.

Change the code in several places:
- when going offline check the delta if it is large/old.
- when going online check if the delta is older than the max age. If so then do not go online.
TagsNo tags attached.
Attached Filesdiff file icon 39260-retail-sync.diff [^] (8,911 bytes) 2018-09-24 21:52 [Show Content]
diff file icon 39260-core.diff [^] (23,612 bytes) 2018-09-24 21:52 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0107008)
hgbot (developer)
2018-09-25 13:39

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: a3509256ed9f4052c844218759e2844e4d85c934
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Sep 25 13:39:28 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a3509256ed9f4052c844218759e2844e4d85c934 [^]

Related to issue 39260: Send delta age in ping, check delta before going offline
Changes to check delta age to prevent offline and to detect illegal offline case.

- added two columns to mobileserverdef to keep track of delta age and of delta age at offline
- MobileServerStatusInformation updates the value of the delta-age when the ping is received
- MobileServerUtils: added utility method
- ServerStateBackground: send the delta age as part of the ping

---
M src-db/database/model/tables/OBMOBC_SERVER_DEFINITION.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/mobile/core/servercontroller/MobileServerStatusInformation.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerUtils.java
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
(0107009)
hgbot (developer)
2018-09-25 13:42

Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 92f9119aa3cba47b72b167a41e6e68ee16ef1485
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Sep 25 13:42:07 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/92f9119aa3cba47b72b167a41e6e68ee16ef1485 [^]

Fixes issue 39260: Send delta age in ping, check delta before going offline
Changes to check delta age to prevent offline and to detect illegal offline case.

- added two columns to exluded columns so they are not synced
- RetailSynchronizationRequestHandler: identify illegal offline (delta age to old when going offline and still delta age too old)
- MobileServerEventHandler: update the delta age column when going offline

---
M src-db/database/sourcedata/STRSYNC_EXCLUDEDCOL.xml
M src/org/openbravo/retail/storeserver/synchronization/RetailSynchronizationRequestHandler.java
M src/org/openbravo/retail/storeserver/synchronization/StoreServerTransitionToOfflineExternalHandler.java
M src/org/openbravo/retail/storeserver/synchronization/eventhandler/MobileServerEventHandler.java
---
(0107010)
mtaal (manager)
2018-09-25 13:46

Added docs here at the end:
http://wiki.openbravo.com/wiki/Store_and_Multi_Server_Preferences [^]
(0107069)
hgbot (developer)
2018-09-28 13:17

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 07854f8395348b321a8cdfed73b693f6aa115619
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Sep 28 13:17:15 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/07854f8395348b321a8cdfed73b693f6aa115619 [^]

Related with issue 39260: Backs out changeset a3509256ed9f

The changeset will be repushed soon, to be included in the next release:

---
M src-db/database/model/tables/OBMOBC_SERVER_DEFINITION.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/mobile/core/servercontroller/MobileServerStatusInformation.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerUtils.java
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
(0107070)
hgbot (developer)
2018-09-28 13:18

Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 93c15c63e55afef822a5212b46c246d4a998c0d2
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Sep 28 13:18:29 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/93c15c63e55afef822a5212b46c246d4a998c0d2 [^]

Related with issue 39260: Backs out changeset 92f9119aa3cb

It will be repushed soon and included in the next release

---
M src-db/database/sourcedata/STRSYNC_EXCLUDEDCOL.xml
M src/org/openbravo/retail/storeserver/synchronization/RetailSynchronizationRequestHandler.java
M src/org/openbravo/retail/storeserver/synchronization/StoreServerTransitionToOfflineExternalHandler.java
M src/org/openbravo/retail/storeserver/synchronization/eventhandler/MobileServerEventHandler.java
---
(0107072)
AugustoMauch (manager)
2018-09-28 13:19

Reopened, its changes have been backed out, since it is a small project it is better to review it thoroughly and include it in the next release
(0107258)
hgbot (developer)
2018-10-15 08:13

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 60563de258fed129abab8a62d5ef769524ba7448
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Oct 15 08:13:11 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/60563de258fed129abab8a62d5ef769524ba7448 [^]

Related to issue 39260: Send delta age in ping, check delta before going offline
Changes to check delta age to prevent offline and to detect illegal offline case.

- added two columns to mobileserverdef to keep track of delta age and of delta age at offline
- MobileServerStatusInformation updates the value of the delta-age when the ping is received
- MobileServerUtils: added utility method
- ServerStateBackground: send the delta age as part of the ping

---
M src-db/database/model/tables/OBMOBC_SERVER_DEFINITION.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/mobile/core/servercontroller/MobileServerStatusInformation.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerUtils.java
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
(0107259)
hgbot (developer)
2018-10-15 08:13

Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 7e10e8bce89788dee81c8eff3523d5518ec4e877
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Oct 15 08:13:43 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/7e10e8bce89788dee81c8eff3523d5518ec4e877 [^]

Fixes issue 39260: Send delta age in ping, check delta before going offline
Changes to check delta age to prevent offline and to detect illegal offline case.

- added two columns to exluded columns so they are not synced
- RetailSynchronizationRequestHandler: identify illegal offline (delta age to old when going offline and still delta age too old)
- MobileServerEventHandler: update the delta age column when going offline

---
M src-db/database/sourcedata/STRSYNC_EXCLUDEDCOL.xml
M src/org/openbravo/retail/storeserver/synchronization/RetailSynchronizationRequestHandler.java
M src/org/openbravo/retail/storeserver/synchronization/StoreServerTransitionToOfflineExternalHandler.java
M src/org/openbravo/retail/storeserver/synchronization/datasource/StoreServerVersionOverviewDatasource.java
M src/org/openbravo/retail/storeserver/synchronization/eventhandler/MobileServerEventHandler.java
---
(0107345)
AugustoMauch (manager)
2018-10-16 17:29
edited on: 2018-10-16 17:29

Reopened because:
- There is a connection leak on MobileServerUtils.isDeltaAgeExpired
- The expiredDeltaAge property is never set, its value is just read on MobileServerEventHandler.updateOfflineIncomingErrorsFlag

(0107373)
hgbot (developer)
2018-10-17 16:35

Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 0b958fcfd0ab16e633cd03ab1660fc7cc8e79623
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Oct 16 16:51:29 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/0b958fcfd0ab16e633cd03ab1660fc7cc8e79623 [^]

Related with issue 39260: Removes code meant for debug

---
M src/org/openbravo/retail/storeserver/synchronization/datasource/StoreServerVersionOverviewDatasource.java
---
(0107466)
hgbot (developer)
2018-10-21 22:55

Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 5120f77fac2b25d2298bb0ebcb26fd0e3032aaf7
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Oct 21 22:55:23 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/5120f77fac2b25d2298bb0ebcb26fd0e3032aaf7 [^]

Related to issue 39260: Send delta age in ping, check delta before going offline
Set correct property

---
M src/org/openbravo/retail/storeserver/synchronization/eventhandler/MobileServerEventHandler.java
---
(0107467)
hgbot (developer)
2018-10-22 07:54

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: e48a21d0eb4464646b5db10d409ac911f2b714df
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Oct 22 07:54:39 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e48a21d0eb4464646b5db10d409ac911f2b714df [^]

Fixes issue 39260: Send delta age in ping, check delta before going offline
Release the read only connection in the method itself

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerUtils.java
---
(0108141)
AugustoMauch (manager)
2018-11-28 09:18

Code reviewed

- Issue History
Date Modified Username Field Change
2018-09-11 09:12 mtaal New Issue
2018-09-11 09:12 mtaal Assigned To => mtaal
2018-09-11 09:12 mtaal Triggers an Emergency Pack => No
2018-09-11 17:54 mtaal Summary Allow going online with a delta and prevent going offline with a large/old delta => Start SS in mode it stopped, send delta age in ping, check delta before going offline
2018-09-11 17:54 mtaal Description Updated View Revisions
2018-09-11 17:54 mtaal Proposed Solution updated
2018-09-24 21:48 mtaal Summary Start SS in mode it stopped, send delta age in ping, check delta before going offline => Send delta age in ping, check delta before going offline
2018-09-24 21:48 mtaal Description Updated View Revisions
2018-09-24 21:48 mtaal Proposed Solution updated
2018-09-24 21:52 mtaal File Added: 39260-retail-sync.diff
2018-09-24 21:52 mtaal File Added: 39260-core.diff
2018-09-25 13:39 hgbot Checkin
2018-09-25 13:39 hgbot Note Added: 0107008
2018-09-25 13:39 mtaal Review Assigned To => AugustoMauch
2018-09-25 13:42 hgbot Checkin
2018-09-25 13:42 hgbot Note Added: 0107009
2018-09-25 13:42 hgbot Status new => resolved
2018-09-25 13:42 hgbot Resolution open => fixed
2018-09-25 13:42 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/92f9119aa3cba47b72b167a41e6e68ee16ef1485 [^]
2018-09-25 13:46 mtaal Note Added: 0107010
2018-09-25 13:49 mtaal Steps to Reproduce Updated View Revisions
2018-09-28 13:17 hgbot Checkin
2018-09-28 13:17 hgbot Note Added: 0107069
2018-09-28 13:18 hgbot Checkin
2018-09-28 13:18 hgbot Note Added: 0107070
2018-09-28 13:19 AugustoMauch Note Added: 0107072
2018-09-28 13:19 AugustoMauch Status resolved => new
2018-09-28 13:19 AugustoMauch Resolution fixed => open
2018-10-15 08:13 hgbot Checkin
2018-10-15 08:13 hgbot Note Added: 0107258
2018-10-15 08:13 hgbot Checkin
2018-10-15 08:13 hgbot Note Added: 0107259
2018-10-15 08:13 hgbot Status new => resolved
2018-10-15 08:13 hgbot Resolution open => fixed
2018-10-15 08:13 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/92f9119aa3cba47b72b167a41e6e68ee16ef1485 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/7e10e8bce89788dee81c8eff3523d5518ec4e877 [^]
2018-10-16 17:29 AugustoMauch Note Added: 0107345
2018-10-16 17:29 AugustoMauch Status resolved => new
2018-10-16 17:29 AugustoMauch Resolution fixed => open
2018-10-16 17:29 AugustoMauch Note Edited: 0107345 View Revisions
2018-10-17 16:35 hgbot Checkin
2018-10-17 16:35 hgbot Note Added: 0107373
2018-10-21 22:55 hgbot Checkin
2018-10-21 22:55 hgbot Note Added: 0107466
2018-10-22 07:54 hgbot Checkin
2018-10-22 07:54 hgbot Note Added: 0107467
2018-10-22 07:54 hgbot Status new => resolved
2018-10-22 07:54 hgbot Resolution open => fixed
2018-10-22 07:54 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/7e10e8bce89788dee81c8eff3523d5518ec4e877 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e48a21d0eb4464646b5db10d409ac911f2b714df [^]
2018-11-28 09:18 AugustoMauch Note Added: 0108141
2018-11-28 09:18 AugustoMauch Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker