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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038505
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Retail Modules] StoreServermajorhave not tried2018-05-08 22:512018-05-31 12:41
ReportermtaalView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision3f7ee63a1a71
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomtaal
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038505: Before going offline do extra ping request

DescriptionCurrently the ss goes offline if a request fails three times to the CS. However, this can be too pessimistic as an error in one specific service can cause the ss to go offline.

The proposal is therefore to do a separate ping request to the CS to check if the CS is indeed not-reachable. This separate ping request to CS should do some simple and meaningful checks on the CS. For example a db query.
Steps To ReproduceSee the code here [1] for example, this forces offline after three failures.

Check all calls to MobileServerController.transitionToOffline

[1]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/tip/src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java#l228 [^]
Proposed SolutionProbably the best place to do the offline transition ping request is in the transitionToOffline method in the MobileServiceController [2]

Note: if the ping request makes use of the MobileServiceRequestExecutor then cyclic call stacks/infinite loops must be prevented.

[2]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/tip/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java#l474 [^]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
has duplicate defect 0038497 closedStoreServer If the store server receives a response from the central server with bad JSON format, it should not go offline 
related to defect 0038935 closedAugustoMauch Wrong check leads to infinite loop,which results in many requests being done from store to central server 

-  Notes
(0104513)
hgbot (developer)
2018-05-15 09:48

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: a5b03e4694a90ebabad4e10736a9b45eef8c00ad
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed May 09 17:35:19 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a5b03e4694a90ebabad4e10736a9b45eef8c00ad [^]

Related with issue 38505: Fixes java format

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0104514)
hgbot (developer)
2018-05-15 09:48

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 5514ff8de2d94e6986971eb769fd0f5dc3071fdd
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed May 09 17:37:55 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5514ff8de2d94e6986971eb769fd0f5dc3071fdd [^]

Related with issue 38505: Dont go offline if central server answers to request

Dont go offline even if the central server includes in its response a status different than ONLINE.

Central servers do not transition to offline, and if they are not reachable the store server will
transition to offline using another flow.

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0104515)
hgbot (developer)
2018-05-15 09:49

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 3a813c770f76a3dbc12693096521537e82d08532
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu May 10 15:45:41 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3a813c770f76a3dbc12693096521537e82d08532 [^]

Related with issue 38505: Do extra ping if central server does not respond

If the central server responds to the ping, do not go offline

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
A src/org/openbravo/mobile/core/servercontroller/CheckServerAvailability.java
---
(0104516)
hgbot (developer)
2018-05-15 09:49

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 2098bb2f8fc85e58ae1f19b0a94109ec581bc40e
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu May 10 16:40:41 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2098bb2f8fc85e58ae1f19b0a94109ec581bc40e [^]

Related with issue 38505: Pick the proper organization

---
M src/org/openbravo/mobile/core/servercontroller/CheckServerAvailability.java
---
(0104517)
hgbot (developer)
2018-05-15 09:52

Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 1ff84248a0c239f78c3d13ecff746b208d45da67
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu May 10 15:46:56 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/1ff84248a0c239f78c3d13ecff746b208d45da67 [^]

Related with issue 38505: Dont go offline in RetailSynchronizationRequestHandler

The logic to decide whether the store server should go offline after a failed request to the central
server is not placed in mobile.core.

---
M src/org/openbravo/retail/storeserver/synchronization/RetailSynchronizationRequestHandler.java
---
(0104537)
hgbot (developer)
2018-05-16 08:43

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 8d5cb7cfb649393de1b24d0c5527f072dca583ef
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed May 16 08:43:20 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8d5cb7cfb649393de1b24d0c5527f072dca583ef [^]

Related with issue 38505: Fixes eclipse warning

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0104593)
mtaal (manager)
2018-05-19 13:18

Review questions:
- question, why was the readtimeout logic removed?
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3a813c770f76a3dbc12693096521537e82d08532#l2.43 [^]

- maybe change this to catch Throwable:
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3a813c770f76a3dbc12693096521537e82d08532#l2.76 [^]
(0104724)
hgbot (developer)
2018-05-26 14:05

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 2b136d59047ef66c397048769ee2b88cb67447af
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Sat May 26 14:04:05 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2b136d59047ef66c397048769ee2b88cb67447af [^]

Related with issue 38505: Responsiveness check is retried, catch throwable instead of exception

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0104729)
mtaal (manager)
2018-05-28 00:07

My remarks:
- log the throwable
- set an explicit readtimeout of 1 minute or 30 seconds or so. Currently it uses the readtimeout of the functional logic which can be 10-15 mins or infinite
(0104754)
hgbot (developer)
2018-05-28 16:57

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 3f7ee63a1a714d4dc5ee30891f82c9dd7ca8fbde
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon May 28 16:57:21 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3f7ee63a1a714d4dc5ee30891f82c9dd7ca8fbde [^]

Fixes issue 38505: Adds log and specifies sets timeout for responsiveness check

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0104822)
mtaal (manager)
2018-05-30 21:00

The readtimeout should be set to a default lower value. The current changeset changes the connecttimeout.
(0104823)
hgbot (developer)
2018-05-31 08:30

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 47652395ef3456122a9b369074bda27e51993f46
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu May 31 10:23:17 2018 +0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/47652395ef3456122a9b369074bda27e51993f46 [^]

Related with issue 38505: Overwrite read timeout, not connection timeout

Now when doing the central server responsiveness test, the read timeout is overwritten, instead of the connection timeout.

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0104839)
mtaal (manager)
2018-05-31 12:41

Works fine tx, the exception which gets thrown for read time out is:
java.net.SocketTimeoutException: Read timed out
(0104840)
mtaal (manager)
2018-05-31 12:41

Reviewed

- Issue History
Date Modified Username Field Change
2018-05-08 22:51 mtaal New Issue
2018-05-08 22:51 mtaal Assigned To => AugustoMauch
2018-05-08 22:51 mtaal Triggers an Emergency Pack => No
2018-05-10 17:13 AugustoMauch Relationship added has duplicate 0038497
2018-05-14 09:46 rafademiguel Issue Monitored: rafademiguel
2018-05-15 09:48 hgbot Checkin
2018-05-15 09:48 hgbot Note Added: 0104513
2018-05-15 09:48 hgbot Checkin
2018-05-15 09:48 hgbot Note Added: 0104514
2018-05-15 09:49 hgbot Checkin
2018-05-15 09:49 hgbot Note Added: 0104515
2018-05-15 09:49 hgbot Checkin
2018-05-15 09:49 hgbot Note Added: 0104516
2018-05-15 09:52 hgbot Checkin
2018-05-15 09:52 hgbot Note Added: 0104517
2018-05-15 10:27 AugustoMauch Status new => scheduled
2018-05-15 10:27 AugustoMauch Fixed in SCM revision => https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3a813c770f76a3dbc12693096521537e82d08532 [^]
2018-05-15 10:27 AugustoMauch Status scheduled => resolved
2018-05-15 10:27 AugustoMauch Resolution open => fixed
2018-05-15 16:25 AugustoMauch Review Assigned To => mtaal
2018-05-16 08:43 hgbot Checkin
2018-05-16 08:43 hgbot Note Added: 0104537
2018-05-19 13:18 mtaal Note Added: 0104593
2018-05-26 14:05 hgbot Checkin
2018-05-26 14:05 hgbot Note Added: 0104724
2018-05-28 00:07 mtaal Note Added: 0104729
2018-05-28 00:07 mtaal Status resolved => new
2018-05-28 00:07 mtaal Resolution fixed => open
2018-05-28 16:57 hgbot Checkin
2018-05-28 16:57 hgbot Note Added: 0104754
2018-05-28 16:57 hgbot Status new => resolved
2018-05-28 16:57 hgbot Resolution open => fixed
2018-05-28 16:57 hgbot Fixed in SCM revision https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3a813c770f76a3dbc12693096521537e82d08532 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3f7ee63a1a714d4dc5ee30891f82c9dd7ca8fbde [^]
2018-05-30 21:00 mtaal Note Added: 0104822
2018-05-30 21:00 mtaal Status resolved => new
2018-05-30 21:00 mtaal Resolution fixed => open
2018-05-31 08:30 hgbot Checkin
2018-05-31 08:30 hgbot Note Added: 0104823
2018-05-31 08:35 AugustoMauch Status new => scheduled
2018-05-31 08:35 AugustoMauch Status scheduled => resolved
2018-05-31 08:35 AugustoMauch Resolution open => fixed
2018-05-31 12:41 mtaal Note Added: 0104839
2018-05-31 12:41 mtaal Note Added: 0104840
2018-05-31 12:41 mtaal Status resolved => closed
2018-07-11 17:57 AugustoMauch Relationship added related to 0038935


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker