Openbravo Issue Tracking System - POS2
View Issue Details
0049873POS2POSpublic2022-07-24 19:212022-08-23 14:40
guilleaer 
guilleaer 
normalcriticalhave not tried
closedfixed 
5
 
22Q4 
No
0049873: A mechanism to detect incorrect state recovery from persistence layer is required
After investigating some sequence breaks in customer production environment we suspect that sometimes the state recovery from persistence layer to the state (when f5 is done) is not working well.
Because of that, the sequence stored in the terminal object is greater than the sequence recovered in the state and the sequence of the terminal overwrites the one from the state


State 20
Terminal 20

Sale 1
State 21
Terminal 20

Sale 2
State 22
Terminal 20

f5 is pressed
For some reason a preious state is recovered an now is the new state
State 19
Terminal 20

In this situation a pieze of code is executed. Since terminal is > to state the new seq in the state is 20

Sale 3
State 20
Terminal 20

DUPLICATED!

Sale 4
State 22
Terminal 20

DUPLICATED!


To be able to find more information we need a mechanism to ensure that the state that we recover is the same state that we saved lastly
N/A
When an order is completed generate a unique UUID in one model which is persisted (docSequence)
When the state is recovered form persistance layer -> log the recovered ID

If we found cases in which the recovered UUID is different from the Last saved UUID then we know that we have a problem in the process to save/restore the state
No tags attached.
depends on backport 004987422Q3 closed Retail A mechanism to detect incorrect state recovery from persistence layer is required 
Issue History
2022-07-24 19:21guilleaerNew Issue
2022-07-24 19:21guilleaerAssigned To => Retail
2022-07-24 19:21guilleaerTriggers an Emergency Pack => No
2022-07-24 19:30hgbotNote Added: 0139561
2022-07-24 19:31hgbotNote Added: 0139562
2022-07-24 19:31guilleaerStatusnew => scheduled
2022-07-24 19:31guilleaerAssigned ToRetail => guilleaer
2022-07-26 08:21javietxeIssue Monitored: javietxe
2022-08-02 00:22hgbotResolutionopen => fixed
2022-08-02 00:22hgbotStatusscheduled => closed
2022-08-02 00:22hgbotFixed in Version => 22Q4
2022-08-02 00:22hgbotNote Added: 0139781
2022-08-02 00:22hgbotNote Added: 0139782
2022-08-02 00:24hgbotNote Added: 0139783
2022-08-02 00:24hgbotNote Added: 0139784
2022-08-03 14:29hgbotFixed in Version22Q4 => 22Q3
2022-08-03 14:29hgbotNote Added: 0139843
2022-08-03 14:29hgbotNote Added: 0139844
2022-08-23 14:39guilleaerNote Deleted: 0139844
2022-08-23 14:39guilleaerNote Deleted: 0139843
2022-08-23 14:40guilleaerFixed in Version22Q3 => 22Q4

Notes
(0139561)
hgbot   
2022-07-24 19:30   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/805 [^]
(0139562)
hgbot   
2022-07-24 19:31   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1104 [^]
(0139781)
hgbot   
2022-08-02 00:22   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 19ad3c8b0e5c9f3cf93d38e3d4b776da78567739
Author: Guillermo Alvarez de Eulate <guillermo.alvarez@openbravo.com>
Date: 02-08-2022 00:22:45
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/19ad3c8b0e5c9f3cf93d38e3d4b776da78567739 [^]

Fixes ISSUE-49873: Write in log latest assigned sequence number when state is recovered from persistence layer

---
M web-jspack/org.openbravo.pos2/src/ob-init.js
---
(0139782)
hgbot   
2022-08-02 00:22   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1104 [^]
(0139783)
hgbot   
2022-08-02 00:24   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/805 [^]
(0139784)
hgbot   
2022-08-02 00:24   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 95cd89cfd9b087fc4462d12165c1007667479c49
Author: Guillermo Alvarez de Eulate <guillermo.alvarez@openbravo.com>
Date: 02-08-2022 00:23:44
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/95cd89cfd9b087fc4462d12165c1007667479c49 [^]

Fixes ISSUE-49873: Adds a hook to be executed when the state is recovered from the persistence layer

---
M web-jspack/org.openbravo.core2/src/core/Registry.js
M web-jspack/org.openbravo.core2/src/ob-init.js
---