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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034628
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 02. Master data managementmajorrandom2016-11-25 09:042018-02-22 18:18
ReporteralostaleView Statuspublic 
Assigned Tocollazoandy4 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q2
StatusclosedFix in branchFixed in SCM revisionda1ddbd84387
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0034628: Manage variants can return unexpected values

DescriptionWhen filtering concurrently in Manage Variants P&E, it is possible to obtain incorrect values.

This is caused because ManageVariantsDS is not thread safe: it is used as singleton but it has state variables that can be messed up by different threads.
Steps To ReproduceIt is quite random and hard to reproduce in real instance so apply attached diff to emulate slower processing.

1. Create a generic product (p) with some variants and execute the "Create Variants" process
2. Open 2 sessions (a and b) and select in both of them that product -> note the products that appear there are p1, p2, p3...
3. In session a filter by search key 1
4. Immediately (less than 2 secs) filter in session b by search key 2
  --> ERROR: note that the response for session a, includes p2 but not p1 as it should be
TagsmultiThread
Attached Filespng file icon Selection_229.png [^] (32,581 bytes) 2017-11-10 10:08


diff file icon slow-variants-ds.diff [^] (721 bytes) 2017-11-10 10:08 [Show Content]
diff file icon slow-variant-fixed.diff [^] (794 bytes) 2017-11-11 01:55 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0034405pi closedNaroaIriarte 'Manage Variants' process returns no items to show when filtering 
blocks design defect 0034664 acknowledgedplatform multi thread unsafeties 

-  Notes
(0100457)
collazoandy4 (developer)
2017-11-11 01:55

Test Plan
  With the slow-variant-fixed.diff applied create a generic product and add 3 or more characteristic and clic on create variants button
  Open 2 sessions (a and b) and select in both of them that product
  In session a filter by search key 1
  Immediately (less than 2 secs) filter in session b by search key 2 and check the filter data is correct in every session
(0101607)
hgbot (developer)
2018-01-08 09:36

Repository: erp/devel/pi
Changeset: da1ddbd843879beb28c8751006ebd728f9cc3de9
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Jan 04 12:50:12 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/da1ddbd843879beb28c8751006ebd728f9cc3de9 [^]

Fixes issue 34628: Manage variants can return unexpected values

When filtering concurrently in Manage Variants P&E, it was possible to obtain
incorrect values. This is caused because ManageVariantsDS is not thread safe it
is used as singleton but it has state variables that can be messed up by
different threads.

The global state variables has been removed and now their values are contained
in a new private class. A new instance of this class is created for every execution
of the process, so the values are not mixed again.

The getData and readCriteria methods have been modified to make use of this new
class.

---
M src/org/openbravo/materialmgmt/ManageVariantsDS.java
---
(0101608)
hgbot (developer)
2018-01-08 09:36

Repository: erp/devel/pi
Changeset: add922deb5848f23f3ec6b7e6cd6c8a8a69494d3
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Jan 04 12:54:31 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/add922deb5848f23f3ec6b7e6cd6c8a8a69494d3 [^]

Related to Issue 34628. Updated license year

---
M src/org/openbravo/materialmgmt/ManageVariantsDS.java
---
(0101611)
dmiguelez (developer)
2018-01-08 09:38

Code Review + Testing Ok
(0102644)
hudsonbot (developer)
2018-02-22 18:18

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/980a6ad5bbf5 [^]
Maturity status: Test
(0102645)
hudsonbot (developer)
2018-02-22 18:18

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/980a6ad5bbf5 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2016-11-25 09:04 alostale New Issue
2016-11-25 09:04 alostale Assigned To => Triage Finance
2016-11-25 09:04 alostale Modules => Core
2016-11-25 09:04 alostale Triggers an Emergency Pack => No
2016-11-25 09:04 alostale Tag Attached: multiThread
2016-11-25 09:05 alostale Issue Monitored: alostale
2016-11-25 09:05 alostale Relationship added related to 0034405
2016-12-01 11:56 alostale Relationship added blocks 0034664
2017-11-08 16:55 collazoandy4 Assigned To Triage Finance => collazoandy4
2017-11-08 16:55 collazoandy4 Status new => scheduled
2017-11-10 10:08 alostale File Added: Selection_229.png
2017-11-10 10:08 alostale File Added: slow-variants-ds.diff
2017-11-11 01:55 collazoandy4 File Added: slow-variant-fixed.diff
2017-11-11 01:55 collazoandy4 Note Added: 0100457
2018-01-08 09:36 hgbot Checkin
2018-01-08 09:36 hgbot Note Added: 0101607
2018-01-08 09:36 hgbot Status scheduled => resolved
2018-01-08 09:36 hgbot Resolution open => fixed
2018-01-08 09:36 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/da1ddbd843879beb28c8751006ebd728f9cc3de9 [^]
2018-01-08 09:36 hgbot Checkin
2018-01-08 09:36 hgbot Note Added: 0101608
2018-01-08 09:38 dmiguelez Review Assigned To => dmiguelez
2018-01-08 09:38 dmiguelez Note Added: 0101611
2018-01-08 09:38 dmiguelez Status resolved => closed
2018-01-08 09:38 dmiguelez Fixed in Version => 3.0PR18Q2
2018-02-22 18:18 hudsonbot Checkin
2018-02-22 18:18 hudsonbot Note Added: 0102644
2018-02-22 18:18 hudsonbot Checkin
2018-02-22 18:18 hudsonbot Note Added: 0102645


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker