Openbravo Issue Tracking System - Retail Modules |
| View Issue Details |
|
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0036787 | Retail Modules | StoreServer | public | 2017-09-05 09:17 | 2017-09-18 22:13 |
|
| Reporter | AugustoMauch | |
| Assigned To | AugustoMauch | |
| 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 | mtaal |
| OBNetwork customer | No |
| Support ticket | |
| Regression level | |
| Regression date | |
| Regression introduced in release | |
| Regression introduced by commit | |
| Triggers an Emergency Pack | No |
|
| Summary | 0036787: Improvements on the processes that handle the transition to online/offline |
| Description | There are a few actions that can be taken to improve the way the transitions to online/offline are managed:
- Improve the log
- Refactor some of the classes that manage the server state
- When a central server is started, force a transition to online to all the store servers
- When a store server is started, reset the latest ping received from the central to prevent false transitions to offline |
| Steps To Reproduce | - |
| Proposed Solution | |
| Additional Information | |
| Tags | No tags attached. |
| Relationships | |
| Attached Files | changes.diff (2,475) 2017-09-18 12:03 https://issues.openbravo.com/file_download.php?file_id=11068&type=bug |
|
| Issue History |
| Date Modified | Username | Field | Change |
| 2017-09-05 09:17 | AugustoMauch | New Issue | |
| 2017-09-05 09:17 | AugustoMauch | Assigned To | => AugustoMauch |
| 2017-09-05 09:17 | AugustoMauch | OBNetwork customer | => No |
| 2017-09-05 09:17 | AugustoMauch | Triggers an Emergency Pack | => No |
| 2017-09-05 12:28 | hgbot | Checkin | |
| 2017-09-05 12:28 | hgbot | Note Added: 0098829 | |
| 2017-09-05 12:32 | AugustoMauch | Summary | Improve log of processes involved in transition to online/offline => Improvements on the processes that handle the transition to online/offline |
| 2017-09-05 12:32 | AugustoMauch | Description Updated | bug_revision_view_page.php?rev_id=15813#r15813 |
| 2017-09-05 13:04 | hgbot | Checkin | |
| 2017-09-05 13:04 | hgbot | Note Added: 0098830 | |
| 2017-09-15 13:31 | hgbot | Checkin | |
| 2017-09-15 13:31 | hgbot | Note Added: 0099074 | |
| 2017-09-15 13:31 | hgbot | Checkin | |
| 2017-09-15 13:31 | hgbot | Note Added: 0099075 | |
| 2017-09-15 13:31 | hgbot | Checkin | |
| 2017-09-15 13:31 | hgbot | Note Added: 0099076 | |
| 2017-09-15 13:32 | hgbot | Checkin | |
| 2017-09-15 13:32 | hgbot | Note Added: 0099077 | |
| 2017-09-15 13:32 | hgbot | Checkin | |
| 2017-09-15 13:32 | hgbot | Note Added: 0099078 | |
| 2017-09-15 13:32 | hgbot | Checkin | |
| 2017-09-15 13:32 | hgbot | Note Added: 0099079 | |
| 2017-09-15 13:32 | hgbot | Checkin | |
| 2017-09-15 13:32 | hgbot | Note Added: 0099080 | |
| 2017-09-15 13:32 | hgbot | Checkin | |
| 2017-09-15 13:32 | hgbot | Note Added: 0099081 | |
| 2017-09-15 13:32 | hgbot | Status | new => resolved |
| 2017-09-15 13:32 | hgbot | Resolution | open => fixed |
| 2017-09-15 13:32 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0d509da73da84b84aa7f717705ec4035db622c51 [^] |
| 2017-09-15 13:32 | hgbot | Checkin | |
| 2017-09-15 13:32 | hgbot | Note Added: 0099082 | |
| 2017-09-15 13:33 | AugustoMauch | Review Assigned To | => mtaal |
| 2017-09-18 11:18 | mtaal | Note Edited: 0099081 | bug_revision_view_page.php?bugnote_id=0099081#r15919 |
| 2017-09-18 12:02 | mtaal | Note Added: 0099098 | |
| 2017-09-18 12:03 | mtaal | Note Added: 0099101 | |
| 2017-09-18 12:03 | mtaal | Status | resolved => new |
| 2017-09-18 12:03 | mtaal | Resolution | fixed => open |
| 2017-09-18 12:03 | mtaal | File Added: changes.diff | |
| 2017-09-18 16:37 | hgbot | Checkin | |
| 2017-09-18 16:37 | hgbot | Note Added: 0099124 | |
| 2017-09-18 16:37 | hgbot | Status | new => resolved |
| 2017-09-18 16:37 | hgbot | Resolution | open => fixed |
| 2017-09-18 16:37 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0d509da73da84b84aa7f717705ec4035db622c51 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2532b94be97f8f35915ee26b3399d7a9679e9976 [^] |
| 2017-09-18 22:13 | mtaal | Note Added: 0099132 | |
| 2017-09-18 22:13 | mtaal | Status | resolved => closed |
|
Notes |
|
|
(0098829)
|
|
hgbot
|
|
2017-09-05 12:28
|
|
|
|
|
(0098830)
|
|
hgbot
|
|
2017-09-05 13:04
|
|
Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: 87771018183749bdcb400c56ca0d3e8bcadce727
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Sep 05 13:04:03 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/87771018183749bdcb400c56ca0d3e8bcadce727 [^]
Related with issue 36787: SetupSymmetricListener cleanup
- Adds static modifier to constants
- Defines constants for "MANDATORY_RELOADING" and "RELOADING"
- Uses diamond operator
- Makes sure PreparedStatement is closed
- Uses log4j built-in formatter
- Handler properly a InterruptedException
- Moves countInitialImportEntries to the inner class it belongs
---
M src/org/openbravo/replication/symmetricds/SetupSymmetricListener.java
---
|
|
|
|
(0099074)
|
|
hgbot
|
|
2017-09-15 13:31
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 4ca0847b2982138d3b11d0c26e7f064ec28c4a96
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Sep 05 09:29:36 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4ca0847b2982138d3b11d0c26e7f064ec28c4a96 [^]
Related with issue 36787: Cleanup of ServerStateBackground.java
- Constants for string literals "Transition to online", "Transition to offline"
- ProcessLogger is defined in the method where it is used
- Adds missing break in TRANSITION_TO_OFFLINE switch case
- Remove unneeded cast to int
- Uses diamond operator
- Handles an InterruptedException properly
- Removes unused parameter from getServersToSendPing method
- Adds some log
- Extracts method that pings a specific server
- Extracts method that obtains the status of a remote server from a response
---
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
|
|
|
|
(0099075)
|
|
hgbot
|
|
2017-09-15 13:31
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: c1797d4b4bb9822356c474e14e32fe6aa12e8bac
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Sep 05 09:37:09 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c1797d4b4bb9822356c474e14e32fe6aa12e8bac [^]
Related with issue 36787: Cleanup of MobileMainServerCheck
- Added some log
- Extracted methods to improve code legibility
* goOffline: Changes the status of the server to offline
* transitionToOnlineIfNeeded: Inits a transition to online unless the server is already online
* waitBeforeNextAttempt: Waits before retrying the offline checks, handles an InterruptedException
* transitionToOfflineIntervalHasPassed: Checks if enough time has passed since the transition of offline begun
* executeOfflineChecks: Executes the transition of offline checks. If the server is a store server, it also checks if the central server is online
---
M src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java
---
|
|
|
|
(0099076)
|
|
hgbot
|
|
2017-09-15 13:31
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: ff4424d0fc33e085ef74003fee2cfd2dd664a809
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Sep 05 09:43:26 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ff4424d0fc33e085ef74003fee2cfd2dd664a809 [^]
Related with issue 36787: Cleanup of MobileServerController
- Added some log
- Attribute modifiers are set in the right order
- Extracted some methods:
* checkOnlineHandlers
* buildOfflineLogFromHandlers
---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
|
|
|
|
(0099077)
|
|
hgbot
|
|
2017-09-15 13:32
|
|
|
|
|
(0099078)
|
|
hgbot
|
|
2017-09-15 13:32
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 79eac4617a14eb3dba957ae3dd2d46f387a14d6d
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Sep 05 12:41:48 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/79eac4617a14eb3dba957ae3dd2d46f387a14d6d [^]
Related with issue 36787: Adds log, refactors, prevents unneeded transitions
- Some log have been added
- If the server that cannot be contacted is not a trigger state server do not start a transition to online
- Extracts a couple of methods
---
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
|
|
|
|
(0099079)
|
|
hgbot
|
|
2017-09-15 13:32
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 2ad450bc557c58bc60c98d278a01344f42875291
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Sep 05 12:45:14 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2ad450bc557c58bc60c98d278a01344f42875291 [^]
Related with issue 36787:Adds more log related with transtion to online/offline
---
M src/org/openbravo/mobile/core/servercontroller/MultiServerJSONProcess.java
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
|
|
|
|
(0099080)
|
|
hgbot
|
|
2017-09-15 13:32
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 0d4b1083f407a66938f7d56133f54aa959324df6
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Sep 05 16:12:54 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0d4b1083f407a66938f7d56133f54aa959324df6 [^]
Related with issue 36787: Listener to reset last ping from the central server
This is needed to prevent detecting the central server as offline when it really isn't.
For instance, if a store server has been offline for some time then during that time it cannot receive pings from the central server.
If the store server starts and the ping is not reset, it might happen that the old ping is checked before the central server has the change to send a new ping, and the store server would consider the central server offline because the last ping was received a long time ago
---
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
A src/org/openbravo/mobile/core/listener/InitializeLastPingFromCentralServer.java
---
|
|
|
|
(0099081)
|
|
hgbot
|
2017-09-15 13:32
(edited on: 2017-09-18 11:18) |
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 0d509da73da84b84aa7f717705ec4035db622c51
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Sep 05 16:45:08 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0d509da73da84b84aa7f717705ec4035db622c51 [^]
Fixes issue 36787:When ping is received after a long time, transition to online
When a store server receives a ping, force a transition to online if the previous ping was received so long ago that the central server was considered offline.
Change visibility of methods getLastPingThreshold and getLastPingFromCentral from ServerStateBackground to reuse them in MobileServerStatusInformation.
---
M src/org/openbravo/mobile/core/servercontroller/MobileServerStatusInformation.java
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
|
|
|
|
(0099082)
|
|
hgbot
|
|
2017-09-15 13:32
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: be3061e028abe31e209f0ae2b5147e875b782fd4
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Sep 12 18:07:50 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/be3061e028abe31e209f0ae2b5147e875b782fd4 [^]
Related with issue 36787: Improves log and other small changes
The server status update log has been reviewed, to show the relevant information, properly setting the log level to DEBUG or INFO.
---
M src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerStatusInformation.java
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
|
|
|
|
(0099098)
|
|
mtaal
|
|
2017-09-18 12:01
|
|
|
Reviewed code changes, additional changes proposed, see attached diff. |
|
|
|
(0099101)
|
|
mtaal
|
|
2017-09-18 12:03
|
|
|
re-open to review additional changes |
|
|
|
(0099124)
|
|
hgbot
|
|
2017-09-18 16:37
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 2532b94be97f8f35915ee26b3399d7a9679e9976
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Sep 18 16:35:17 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2532b94be97f8f35915ee26b3399d7a9679e9976 [^]
Fixes issue 36787: Update level in preference query, clarifies context change
Now the OBMOBC_Ping_Periodicity will be read even if it is not set by the user Openbravo in the System client.
Also, now it is explained why it is needed to set the proper client in the OBContext in MobileServerStatusInformation.
---
M src/org/openbravo/mobile/core/servercontroller/MobileServerStatusInformation.java
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
|
|
|
|
(0099132)
|
|
mtaal
|
|
2017-09-18 22:13
|
|
|