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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035674
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2017-04-03 11:012017-05-29 17:43
ReportermaiteView Statuspublic 
Assigned Toinigosanchez 
PriorityurgentResolutionfixedFixed in Version3.0PR17Q3
StatusclosedFix in branchFixed in SCM revisiona6134d0fa858
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035674: Concurrency problems applying datasets

DescriptionDataset information is duplicated in case 2 different users apply it at the same time
Steps To Reproduce1. Install the Spanish Professional Localization Pack [1].
2. Go to modules folder, delete and clone this module [2]. Ensures that version 4.1.600 of the module is applied.
3. Login in the ERP as F&B International Admin role.
4. Go to Enterprise Module Management and apply "taxes" dataset: Taxes: configuration for Spain (Impuestos de EspaƱa) 1.2.202.
5. Ensure that 2 users access to Enterprise Module Management window, each user using their browser, both select "347" dataset and run process at the same time.
6. Both user will receive succesfull message. In fact, dataset is applied twice (see ad_orgmodule). Note that if you access to "Tax Report" window you will find duplicated data.

[1].- http://centralrepository.openbravo.com/openbravo/org.openbravo.forge.ui/sso/ForgeModuleDetail/Professional-Localization-Pack-Spain-Espana-Cash-VAT [^]
[2].- http://centralrepository.openbravo.com/openbravo/org.openbravo.forge.ui/ForgeModuleDetail/Spain-AEAT-Modelo-347-For-APR [^]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on defect 0035970 closedinigosanchez API changes related with added a unique constraint in ad_orgmodule 

-  Notes
(0096515)
hgbot (developer)
2017-05-10 16:25

Repository: erp/devel/pi
Changeset: a6134d0fa858c5ea1af4619d506d399dae8e8262
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Wed May 10 16:23:40 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a6134d0fa858c5ea1af4619d506d399dae8e8262 [^]

Fixed issue 35674: Concurrency problems applying datasets

The problem occured applying the same dataset (at the same time) for the same client,
organization and version. This problem is not reproduced always. It is a concurrency
problem not managed properly.

In order to resolved this problem two diferent actions have been done:
- Added a unique constraint in ad_orgmodule in order to prevent duplicated data for the
same client, org, module and version. This table is used to check when a dataset is
applied. Besides a BuildValidation is added in order to prevent an error when the unique
constraint applied.
- The same connection is used when applying datasets in order to ensures that all the
modifications in the database are done in the same transaction. Besides some checks has
been improvement.

Now the problem has been fixed by take into account concurrency problems properly.

---
M src-db/database/model/tables/AD_ORGMODULE.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/erpCommon/ad_forms/UpdateReferenceData.java
M src/org/openbravo/erpCommon/ad_forms/UpdateReferenceData_data.xsql
A src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/DuplicatedOrgModuleDatasets.class
A src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/DuplicatedOrgModuleDatasetsData.class
A src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicatedOrgModuleDatasets.java
A src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicatedOrgModuleDatasets_data.xsql
---
(0096516)
inigosanchez (developer)
2017-05-10 16:28

If new build validation fails this info [1] is referenced.

[1]. http://wiki.openbravo.com/wiki/Duplicated_Data_Into_AD_ORGMODULE [^]
(0096523)
alostale (manager)
2017-05-11 09:21

code reviewed

didn't find any case where dataset can be applied more than once
(0096955)
hudsonbot (developer)
2017-05-29 17:43

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/1ee70113bdc4 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-04-03 11:01 maite New Issue
2017-04-03 11:01 maite Assigned To => platform
2017-04-03 11:01 maite Modules => Core
2017-04-03 11:01 maite Resolution time => 1492639200
2017-04-03 11:01 maite Triggers an Emergency Pack => No
2017-04-03 11:01 maite Issue Monitored: networkb
2017-04-07 09:05 alostale Status new => acknowledged
2017-04-24 09:23 inigosanchez Status acknowledged => scheduled
2017-04-24 09:23 inigosanchez Assigned To platform => inigosanchez
2017-04-26 16:15 inigosanchez Steps to Reproduce Updated View Revisions
2017-05-10 15:16 inigosanchez Relationship added related to 0035970
2017-05-10 15:18 inigosanchez Relationship deleted related to 0035970
2017-05-10 15:18 inigosanchez Relationship added depends on 0035970
2017-05-10 16:25 hgbot Checkin
2017-05-10 16:25 hgbot Note Added: 0096515
2017-05-10 16:25 hgbot Status scheduled => resolved
2017-05-10 16:25 hgbot Resolution open => fixed
2017-05-10 16:25 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a6134d0fa858c5ea1af4619d506d399dae8e8262 [^]
2017-05-10 16:28 inigosanchez Note Added: 0096516
2017-05-10 16:28 inigosanchez Review Assigned To => alostale
2017-05-11 09:21 alostale Note Added: 0096523
2017-05-11 09:21 alostale Status resolved => closed
2017-05-11 09:21 alostale Fixed in Version => 3.0PR17Q3
2017-05-29 17:43 hudsonbot Checkin
2017-05-29 17:43 hudsonbot Note Added: 0096955


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker