Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0039260 | Retail Modules | StoreServer | public | 2018-09-11 09:12 | 2018-11-28 09:18 |
|
Reporter | mtaal | |
Assigned To | mtaal | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | AugustoMauch |
OBNetwork customer | No |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0039260: Send delta age in ping, check delta before going offline |
Description | When 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 Reproduce | Run 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 Solution | New 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. |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | 39260-retail-sync.diff (8,911) 2018-09-24 21:52 https://issues.openbravo.com/file_download.php?file_id=12171&type=bug
39260-core.diff (23,612) 2018-09-24 21:52 https://issues.openbravo.com/file_download.php?file_id=12172&type=bug |
|
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 | OBNetwork customer | => No |
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 | bug_revision_view_page.php?rev_id=17621#r17621 |
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 | bug_revision_view_page.php?rev_id=17667#r17667 |
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 | bug_revision_view_page.php?rev_id=17687#r17687 |
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 | bug_revision_view_page.php?bugnote_id=0107345#r17769 |
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 |
Notes |
|
(0107008)
|
hgbot
|
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
|
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
|
2018-09-25 13:46
|
|
|
|
(0107069)
|
hgbot
|
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
|
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
---
|
|
|
|
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
|
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
|
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
---
|
|
|
|
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
|
2018-10-17 16:35
|
|
|
|
(0107466)
|
hgbot
|
2018-10-21 22:55
|
|
|
|
(0107467)
|
hgbot
|
2018-10-22 07:54
|
|
|
|
|
|