Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040648Retail ModulesStoreServerpublic2019-04-18 16:172019-06-10 17:49
mtaal 
mtaal 
normalmajorhave not tried
closedfixed 
5
 
 
AugustoMauch
No
0040648: Make the store server more sensitive to overloaded cs
when processing a request the ss should be more sensitive to the cs being overloaded.

Proposal:
- when 3 (max retries will be configurable) read time outs occur on a functional request the ss goes offline
- the timeout will be configurable in seconds (currently it is in minutes)
- every time a time out exception occurs the system will increase the time out wait time, so first time is 1*pref_value, second try uses: 2*pref_value, third time 3*pref_value

For other non-read-time-out exceptions the logic will stay the same that the ss does an extra low-impact ping to the cs.
Create multi-server env
Put breakpoint for request coming from webpos
Do the action in webpos
See in the MobileServerRequestExecutor the requests times out
See description
No tags attached.
related to design defect 0040994 closed mtaal Store server transition to offline has too long wait time, uses an old preference and can be simplified 
diff new_diff_ss.diff (27,338) 2019-06-05 04:16
https://issues.openbravo.com/file_download.php?file_id=13004&type=bug
Issue History
2019-04-18 16:17mtaalNew Issue
2019-04-18 16:17mtaalAssigned To => mtaal
2019-04-18 16:17mtaalTriggers an Emergency Pack => No
2019-04-22 06:29mtaalReview Assigned To => AugustoMauch
2019-04-22 06:29hgbotCheckin
2019-04-22 06:29hgbotNote Added: 0111217
2019-04-22 06:29hgbotStatusnew => resolved
2019-04-22 06:29hgbotResolutionopen => fixed
2019-04-22 06:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0dbe7c99bb192978bbe1e81726f0c8a28d3929f2 [^]
2019-04-22 22:35hgbotCheckin
2019-04-22 22:35hgbotNote Added: 0111220
2019-04-22 22:35hgbotCheckin
2019-04-22 22:35hgbotNote Added: 0111221
2019-04-24 18:19AugustoMauchNote Added: 0111292
2019-04-24 18:19AugustoMauchStatusresolved => closed
2019-05-06 23:14mtaalNote Added: 0111515
2019-05-06 23:14mtaalStatusclosed => new
2019-05-06 23:14mtaalResolutionfixed => open
2019-05-06 23:15mtaalFile Added: 40648_but_5.diff
2019-05-07 20:44mtaalFile Deleted: 40648_but_5.diff
2019-05-07 20:44mtaalFile Added: but_core_1.diff
2019-05-13 16:09AugustoMauchNote Added: 0111645
2019-05-15 22:33hgbotCheckin
2019-05-15 22:33hgbotNote Added: 0111694
2019-05-15 22:50mtaalFile Added: 40468_2.diff
2019-05-15 22:51mtaalFile Deleted: 40468_2.diff
2019-05-15 22:51mtaalFile Added: 40648_2.diff
2019-05-25 11:38mtaalFile Deleted: but_core_1.diff
2019-05-25 11:38mtaalFile Deleted: 40648_2.diff
2019-05-25 11:39mtaalFile Added: 40648-complete.diff
2019-05-25 22:08hgbotCheckin
2019-05-25 22:08hgbotNote Added: 0112140
2019-05-25 22:08hgbotStatusnew => resolved
2019-05-25 22:08hgbotResolutionopen => fixed
2019-05-25 22:08hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0dbe7c99bb192978bbe1e81726f0c8a28d3929f2 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/790dfcea17befe2e5b0b94b5d2487ef8fffa4a7c [^]
2019-05-25 23:27hgbotCheckin
2019-05-25 23:27hgbotNote Added: 0112141
2019-05-25 23:29mtaalFile Deleted: 40648-complete.diff
2019-05-25 23:31mtaalNote Added: 0112142
2019-05-28 17:15AugustoMauchNote Added: 0112212
2019-05-28 17:15AugustoMauchStatusresolved => closed
2019-05-31 15:01mtaalRelationship addedrelated to 0040994
2019-06-05 04:16mtaalFile Added: new_diff_ss.diff
2019-06-06 11:45hgbotCheckin
2019-06-06 11:45hgbotNote Added: 0112466
2019-06-06 11:47hgbotCheckin
2019-06-06 11:47hgbotNote Added: 0112467
2019-06-06 22:28hgbotCheckin
2019-06-06 22:28hgbotNote Added: 0112491
2019-06-06 22:30hgbotCheckin
2019-06-06 22:30hgbotNote Added: 0112492
2019-06-07 17:45hgbotCheckin
2019-06-07 17:45hgbotNote Added: 0112510
2019-06-07 17:46hgbotCheckin
2019-06-07 17:46hgbotNote Added: 0112511
2019-06-08 16:56hgbotCheckin
2019-06-08 16:56hgbotNote Added: 0112516
2019-06-08 16:56hgbotStatusclosed => resolved
2019-06-08 16:56hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/790dfcea17befe2e5b0b94b5d2487ef8fffa4a7c [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6b962954112a6d5c3a70ab44f4351efc80065594 [^]
2019-06-10 15:20AugustoMauchNote Added: 0112542
2019-06-10 15:20AugustoMauchStatusresolved => closed
2019-06-10 16:17hgbotCheckin
2019-06-10 16:17hgbotNote Added: 0112546
2019-06-10 17:49hgbotCheckin
2019-06-10 17:49hgbotNote Added: 0112554

Notes
(0111217)
hgbot   
2019-04-22 06:29   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 0dbe7c99bb192978bbe1e81726f0c8a28d3929f2
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Apr 22 06:29:38 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0dbe7c99bb192978bbe1e81726f0c8a28d3929f2 [^]

Fixes issue 40648: Make the store server more sensitive to overloaded cs
Go offline after all requests timeout

---
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0111220)
hgbot   
2019-04-22 22:35   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: b400a851872ad10780132431802a6339887ff5d8
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Apr 22 22:33:49 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b400a851872ad10780132431802a6339887ff5d8 [^]

Related to issue 40648: Make the store server more sensitive to overloaded cs
Repair api change

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0111221)
hgbot   
2019-04-22 22:35   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 44189f9ba4538b6781cdfb1800b9afd6a7017ed2
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Apr 22 22:34:25 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/44189f9ba4538b6781cdfb1800b9afd6a7017ed2 [^]

Related to issue 40648: Make the store server more sensitive to overloaded cs
Updated copyright year

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0111292)
AugustoMauch   
2019-04-24 18:19   
Code reviewed and verified
(0111515)
mtaal   
2019-05-06 23:14   
additional changes needed
(0111645)
AugustoMauch   
2019-05-13 16:09   
The new patch looks very, the only think that can be improved is the following message, that is a bit unclear:

// wait a while to not ping-pong between states
(0111694)
hgbot   
2019-05-15 22:33   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: fd1bb5bbc8eee2b9a3340096a4f0f2620ee35c43
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed May 15 22:33:24 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fd1bb5bbc8eee2b9a3340096a4f0f2620ee35c43 [^]

Related to issue 40648: Make the store server more sensitive to overloaded cs

MobileMainServerCheck: do not ping cs on TOF status, go offline after certain wait time
MobileServerController: make logic to set transition timestamp public
MobileServerRequestExecutor: check cnt db errors and read time out errors, go offline if more than max retries found
do not check cs with ping anymore, cache the read time out preference only in case it was read not by a system user

---
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/MobileServerRequestExecutor.java
---
(0112140)
hgbot   
2019-05-25 22:08   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 790dfcea17befe2e5b0b94b5d2487ef8fffa4a7c
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sat May 25 12:08:31 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/790dfcea17befe2e5b0b94b5d2487ef8fffa4a7c [^]

Fixes issue 40648: Make the store server more sensitive to overloaded cs
Changes:
CheckServerAvailability: check postgres connections
MobileMainServerCheck: simplify transition to offline to only wait
MobileServerController: move code to callable method
MobileServerRequestExecutor: change a preference to seconds and use shorter timeout for extra check

---
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/mobile/core/servercontroller/CheckServerAvailability.java
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/MobileServerRequestExecutor.java
---
(0112141)
hgbot   
2019-05-25 23:27   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 72b30431bd75c5b1d5d9d7361414e1331240e230
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sat May 25 23:26:56 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/72b30431bd75c5b1d5d9d7361414e1331240e230 [^]

Related to issue 40648: Make the store server more sensitive to overloaded cs
Also check server availability before transitioning to online

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0112142)
mtaal   
2019-05-25 23:31   
Note:
Commits of 15th May and before have been backed out:
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ca7eed56ca97 [^]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a4dc69c40a62 [^]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/55ecbb4b768b [^]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/426991f1ccf5 [^]
(0112212)
AugustoMauch   
2019-05-28 17:15   
Code reviewed and verified
(0112466)
hgbot   
2019-06-06 11:45   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 4df2d4b41e3cc7d348709a7b7fa008de3b94b4e2
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Jun 06 11:45:49 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4df2d4b41e3cc7d348709a7b7fa008de3b94b4e2 [^]

Related to issue 40648: readd checks when transition to offline
Use the store org to set the query parameters

---
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
(0112467)
hgbot   
2019-06-06 11:47   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: a75e3f6ab144abe75eec8e24a8b990b84d18bf76
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Jun 06 11:47:42 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a75e3f6ab144abe75eec8e24a8b990b84d18bf76 [^]

Related to issue 40648: Make the store server more sensitive to overloaded cs
Remove unintended line

---
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
(0112491)
hgbot   
2019-06-06 22:28   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 8ef26fe149bdcb184c3c0e21ec85e66d0881c936
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Jun 06 22:28:01 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8ef26fe149bdcb184c3c0e21ec85e66d0881c936 [^]

Related to issue 40648: Make the store server more sensitive to overloaded cs
Pass the store org explicitly to the check availability and use it to read the preference

---
M src/org/openbravo/mobile/core/servercontroller/CheckServerAvailability.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0112492)
hgbot   
2019-06-06 22:30   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 4476b7e46812363e0ca74a6dbf16a601f91c9c04
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Jun 06 22:29:55 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4476b7e46812363e0ca74a6dbf16a601f91c9c04 [^]

Related to issue 40648: Make the store server more sensitive to overloaded cs
Remove accidental System.err.println

---
M src/org/openbravo/mobile/core/servercontroller/CheckServerAvailability.java
---
(0112510)
hgbot   
2019-06-07 17:45   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 178938b08358a3ac4479cfecac4e442d44e8f986
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Jun 07 17:45:29 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/178938b08358a3ac4479cfecac4e442d44e8f986 [^]

Backed out changeset 4476b7e46812
Related to issue 40648

---
M src/org/openbravo/mobile/core/servercontroller/CheckServerAvailability.java
---
(0112511)
hgbot   
2019-06-07 17:46   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 75caa91d212dd924c1d102c0df68eaf84b9e3749
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Jun 07 17:45:51 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/75caa91d212dd924c1d102c0df68eaf84b9e3749 [^]

Backed out changeset 8ef26fe149bd
Related to issue 40648

---
M src/org/openbravo/mobile/core/servercontroller/CheckServerAvailability.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0112516)
hgbot   
2019-06-08 16:56   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 6b962954112a6d5c3a70ab44f4351efc80065594
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sat Jun 08 16:56:41 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6b962954112a6d5c3a70ab44f4351efc80065594 [^]

Fixes issue 40648: Make the store server more sensitive to overloaded cs
Use the correct role to ensure that pref on store level works.
Add log with user information in check availability

---
M src/org/openbravo/mobile/core/servercontroller/CheckServerAvailability.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0112542)
AugustoMauch   
2019-06-10 15:20   
Code reviewed and verified
(0112546)
hgbot   
2019-06-10 16:17   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 9af25c343b365ecc4acc6e36c77b36548fee7fc5
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Jun 10 16:17:39 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/9af25c343b365ecc4acc6e36c77b36548fee7fc5 [^]

Related to issue 40648: Make the store server more sensitive to overloaded cs
Use timeout of 10 secs instead of 5.

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0112554)
hgbot   
2019-06-10 17:49   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: a55bccc2a5510743f3b12a3fa52126bf543ef4bf
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Jun 10 17:49:35 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a55bccc2a5510743f3b12a3fa52126bf543ef4bf [^]

Related to issue 40648: Make the store server more sensitive to overloaded cs
Use the newer api to read the preference on store level without enforcing a role

---
M src/org/openbravo/mobile/core/servercontroller/CheckServerAvailability.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---