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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0049524
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 02. Master data managementmajoralways2022-06-09 16:302022-06-21 15:54
ReportergorkaionView Statuspublic 
Assigned Toigor_trebol 
PriorityhighResolutionfixedFixed in VersionPR22Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0049524: ProductCharacteristicValueEventHandler creates and hold a lock on 100 products

DescriptionThe ProductCharacteristicValueEventHandler creates an import entry to run the VariantChDescUpdate process that can hold up to 100 products.

When this happens a lock is created on the products that is not released until the VariantChDescUpdate process finishes for all of them.

This can create contention on other processes running in parallel modifying the same set of products.

This is reproduced on a customer instance running integrations on Characteristics and Products at the same time. Initially a dead-lock was generated. We have fix the product integration to release the lock on the product earlier but now we are having contention cuased by the ProductCharacteristicValueEventHandler/VariantChDescUpdate process.
Steps To ReproduceIt is required:
1. A characteristic defined on 100 products.
2. Modify the value of a characteristic so it is required to update the ch description of those products.
3. Check that the VariantChDescUpdate is run and a lock is created for all the products and not released until the process finishes.
Proposed Solutionsolution 1: Modify VariantChDescUpdateProcessor [1] so a commit is executed on each product update to release the lock.

solution 2: Modify ProductCharacteristicValueEventHandler [2]to reduce the Import Entry Size constant to a lower value (1?) or make it configurable.



[1] https://gitlab.com/openbravo/product/openbravo/-/blob/master/src/org/openbravo/materialmgmt/VariantChDescUpdateProcessor.java#L64 [^]
[2] https://gitlab.com/openbravo/product/openbravo/-/blob/master/src/org/openbravo/event/ProductCharacteristicValueEventHandler.java#L48 [^]
TagsNOR
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0037852 closedmarkmm82 VariantChDescUpdateProcessor fails with OutOfMemoryError when there are many products to update 0000752:0000600 
related to design defect 0033210pi closedgorkaion VariantChDescUpdateProcess executed using ImportEntries instead of ProcessBundle 

-  Notes
(0138570)
hgbot (developer)
2022-06-20 16:07

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/624 [^]
(0138596)
hgbot (developer)
2022-06-21 15:54

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 6f437d75521e21efd2965cb11b57ab2aa992d560
Author: Igor Trebol <igor.trebol@openbravo.com>
Date: 21-06-2022 15:53:09
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/6f437d75521e21efd2965cb11b57ab2aa992d560 [^]

Fixes ISSUE-49524: Each product is commited after changing the description on characteristic update

---
M src/org/openbravo/materialmgmt/VariantChDescUpdateProcessor.java
---
(0138597)
hgbot (developer)
2022-06-21 15:54

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/624 [^]

- Issue History
Date Modified Username Field Change
2022-06-09 16:30 gorkaion New Issue
2022-06-09 16:30 gorkaion Assigned To => Triage Omni OMS
2022-06-09 16:30 gorkaion Modules => Core
2022-06-09 16:30 gorkaion Triggers an Emergency Pack => No
2022-06-14 12:31 rafaroda Tag Attached: NOR
2022-06-15 16:40 aferraz Relationship added related to 0037852
2022-06-15 16:41 aferraz Assigned To Triage Omni OMS => igor_trebol
2022-06-16 13:50 igor_trebol Relationship added related to 0033210
2022-06-20 16:07 hgbot Note Added: 0138570
2022-06-21 15:54 hgbot Resolution open => fixed
2022-06-21 15:54 hgbot Status new => closed
2022-06-21 15:54 hgbot Fixed in Version => PR22Q3
2022-06-21 15:54 hgbot Note Added: 0138596
2022-06-21 15:54 hgbot Note Added: 0138597


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker