Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0027162 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | critical | have not tried | 2014-07-23 09:58 | 2014-08-01 16:45 | |||
Reporter | marvintm | View Status | public | |||||
Assigned To | marvintm | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | cd5c9600321b | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | Orekaria | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0027162: Due to wrong uuid generation, it could happen that tickets are lost | |||||||
Description | The Web POS uses the following mechanism to generate and synchronize data (such as tickets): - A unique identifier (UUID) is generated for every document created in the client side. - When the document is complete, it is sent to the backend with this identifier included. - The backend verifies that a document with this id doesn't exist. If it exists, it considers the document as a duplicate. - If it doesn't, it saves the document. - When the backend replies to the client side that the synchronization went well, then the client side removes the document from its internal database. This system is designed to avoid the problem of duplicated documents, by identifying each one with a unique id. This problem might happen if the client loses connection after sending a document. As it has lost connection, it cannot receive the response from the backend, and therefore it cannot be sure that it was saved correctly, so in this case it sends it again. However, as it has a unique id, the backend will find it and therefore will not duplicate it. The issue here is that in some cases, it has been detected that the function which generates unique ids in the client side can in fact generate the same id more than once, due to how it is constructed. This can cause that tickets are lost, due to being incorrectly identified as duplicated. | |||||||
Steps To Reproduce | There are no clear steps to reproduce. This has been reproduced in a real customer however. | |||||||
Proposed Solution | The get_uuid function needs to be rebuilt so that it works correctly. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0068860) hgbot (developer) 2014-07-24 12:40 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: f440ab4b2250d1e90a2bdad3976b38953aaf4567 Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Thu Jul 24 12:39:21 2014 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f440ab4b2250d1e90a2bdad3976b38953aaf4567 [^] Fixed issue 27162. Two changes have been made: - A new uuid generation method has been included. This new method will work much better, and should not produce duplicated ids. - An additional check has been added, in case the id of the new ticket corresponds to the id of an existing ticket. In this case, the document numbers will be compared to verify that the tickets are indeed the same, and otherwise, the new ticket will be saved as an error instead of being discarded. --- M src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java M web/org.openbravo.mobile.core/source/data/ob-dal.js --- |
(0068861) hgbot (developer) 2014-07-24 12:41 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: cd5c9600321bf250f4061acce65747536deec358 Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Thu Jul 24 12:40:29 2014 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/cd5c9600321bf250f4061acce65747536deec358 [^] Fixed issue 27162. Two changes have been made: - A new uuid generation method has been included. This new method will work much better, and should not produce duplicated ids. - An additional check has been added, in case the id of the new ticket corresponds to the id of an existing ticket. In this case, the document numbers will be compared to verify that the tickets are indeed the same, and otherwise, the new ticket will be saved as an error instead of being discarded. --- M src/org/openbravo/retail/posterminal/OrderLoader.java --- |
(0068862) hgbot (developer) 2014-07-24 12:48 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: 891cc7b85af7e733e33b84eb993b491f48b959bd Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Thu Jul 24 12:47:47 2014 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/891cc7b85af7e733e33b84eb993b491f48b959bd [^] Related to issue 27162. Fixed jslint warnings --- M web/org.openbravo.mobile.core/source/data/ob-dal.js --- |
(0068867) Orekaria (viewer) 2014-07-24 13:55 |
Revised and Tested with DuplicatedTicketAreSavedProperly and EquivalentTicketsSavedCorrectly |
(0068872) Orekaria (viewer) 2014-07-24 17:25 |
Test created: I27162_GetuuidFailsToBeUnique Although this test generates only 100.000 random ids, it will be able to probe the uniqueness in a long period of time. If this test fails more than once in a very long time... the algorithm is failing to be unique and should be revisited |
(0069036) hgbot (developer) 2014-08-01 16:45 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: 04dab10f54aeaa38134523d6ea634edb585a8551 Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Fri Aug 01 16:45:07 2014 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/04dab10f54aeaa38134523d6ea634edb585a8551 [^] Related to issue 27162. Small changes after code-review --- M src/org/openbravo/retail/posterminal/OrderLoader.java --- |
![]() |
|||
Date Modified | Username | Field | Change |
2014-07-23 09:58 | marvintm | New Issue | |
2014-07-23 09:58 | marvintm | Assigned To | => marvintm |
2014-07-23 09:58 | marvintm | OBNetwork customer | => No |
2014-07-23 09:58 | marvintm | Triggers an Emergency Pack | => No |
2014-07-23 10:57 | mtaal | Issue Monitored: mtaal | |
2014-07-23 11:08 | adrianromero | Relationship added | related to 0026977 |
2014-07-24 12:40 | hgbot | Checkin | |
2014-07-24 12:40 | hgbot | Note Added: 0068860 | |
2014-07-24 12:40 | hgbot | Status | new => resolved |
2014-07-24 12:40 | hgbot | Resolution | open => fixed |
2014-07-24 12:40 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f440ab4b2250d1e90a2bdad3976b38953aaf4567 [^] |
2014-07-24 12:41 | hgbot | Checkin | |
2014-07-24 12:41 | hgbot | Note Added: 0068861 | |
2014-07-24 12:41 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f440ab4b2250d1e90a2bdad3976b38953aaf4567 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/cd5c9600321bf250f4061acce65747536deec358 [^] |
2014-07-24 12:48 | hgbot | Checkin | |
2014-07-24 12:48 | hgbot | Note Added: 0068862 | |
2014-07-24 13:55 | Orekaria | Review Assigned To | => Orekaria |
2014-07-24 13:55 | Orekaria | Note Added: 0068867 | |
2014-07-24 13:55 | Orekaria | Status | resolved => closed |
2014-07-24 17:25 | Orekaria | Note Added: 0068872 | |
2014-08-01 16:45 | hgbot | Checkin | |
2014-08-01 16:45 | hgbot | Note Added: 0069036 |
Copyright © 2000 - 2009 MantisBT Group |