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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035889
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Sessionsmajorsometimes2017-03-15 10:282017-06-21 18:27
Reporterjorge-garciaView Statuspublic 
Assigned Tojorge-garcia 
PriorityhighResolutionfixedFixed in VersionRR17Q2.1
StatusclosedFix in branchFixed in SCM revision30af84636c5b
ProjectionnoneETAnoneTarget VersionRR17Q2.1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035889: It's possible to execute in parallel the creation of two cashup objects in database

DescriptionIn sessions module, it's possible to execute in parallel the creation of two cashups with the same id in database.

This two cashups are created one from the openTill object (not a synchronization model) and other from the difference transaction when the store is open (cashmgmt is a synchronization model).
Steps To ReproduceThe issue is reproducible in the integration:

Errors in the OBPOS_Errors table while importing POS data: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
TYPE --> FIN_Finacc_Transaction
ERROR -->
java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (TRY_RET_MODULES_ORACLE_SUITE2.OBPOS_APPCASH_PK) violated
Proposed SolutionPatch attached
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0035521 closedjorge-garcia It's possible to execute in parallel the creation of two cashup objects in database 

-  Notes
(0097443)
hgbot (developer)
2017-06-16 14:21

Repository: retail/backports/3.0RR17Q2.1/org.openbravo.retail.posterminal
Changeset: 30af84636c5bcb025608cfd104dee43ce9476819
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Jun 16 13:57:26 2017 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR17Q2.1/org.openbravo.retail.posterminal/rev/30af84636c5bcb025608cfd104dee43ce9476819 [^]

Fixed issue 35889: It's possible to execute in parallel the creation of two
cashup objects in database

The user case here is to do an open till and create a transaction with
differences in the count cash tab.

Both messages send information regarding the status of the cashup, the
cashup report.

If the cashup sent doesn’t exists in the database, the cashup is
created in order to save it.

At this point, we have implement a solution for two cases:

If synchronize mode is NOT active:

* Those two messages could be executed in parallel because open till message
is not a synchronize model and it’s executed immediately the server gets the
message. In this case, to avoid error in the cashup primary key trying to create
two cashups with the same id, we persist in database the header of the cashup,
and, in case there is a second message with the same cashup id, it will detect
the cashup and won’t try to create it again.

If synchronize mode is active:

* Those messages will not be executed at the same time. Until the open till
response is coming back from the server, the execution in WebPOS is stopped.
Then the transaction of differences in the count cash will be sent to the server,
and the cashup will exists.

---
M src/org/openbravo/retail/posterminal/UpdateCashup.java
---

- Issue History
Date Modified Username Field Change
2017-05-02 11:45 jorge-garcia Type defect => backport
2017-05-02 11:45 jorge-garcia Target Version => RR17Q2.1
2017-06-16 14:21 hgbot Checkin
2017-06-16 14:21 hgbot Note Added: 0097443
2017-06-16 14:21 hgbot Status scheduled => resolved
2017-06-16 14:21 hgbot Resolution open => fixed
2017-06-16 14:21 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/163813a4c948a28853553968f005e087bc37afb8 [^] => http://code.openbravo.com/retail/backports/3.0RR17Q2.1/org.openbravo.retail.posterminal/rev/30af84636c5bcb025608cfd104dee43ce9476819 [^]
2017-06-21 18:27 marvintm Review Assigned To => marvintm
2017-06-21 18:27 marvintm Status resolved => closed
2017-06-21 18:27 marvintm Fixed in Version => RR17Q2.1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker