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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0050697
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] A. Platformcriticalhave not tried2022-10-17 11:162022-11-03 11:38
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in VersionPR22Q3.2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionPR22Q3.2
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

0050697: Cycles in entities that represents data as a tree can lead to transaction that does not finish, 100% use of CPU

DescriptionThe data of some entities (i.e. ProductCategory) can be represented as a tree, where each entry has a single parent entry. These entities can be visualized in a tree grid.

If the data of any of these entities is not proper and there are cycles (i.e. the parent of an entry is the entry itself), then using the filter in the tree grid can lead to a database transaction that will never be closed and a close to 100% use of the CPU.
Steps To Reproduce- Force a cycle in the hierarchy of any Openbravo entity, i.e. this will create a cycle in the product characteristic tree of the White Valley sampledata client (electronics category will be its own parent):

update ad_treenode set parent_id = '3ECCEC0B766E4A25A697187A58B15B71' where node_id = '3ECCEC0B766E4A25A697187A58B15B71';

- After that, open the Product Characteristic window under that client, change to the tree grid view and filter by entering a 'c'
- Nothing will be displayed in the grid filter and a transaction will remain open in the database. You can check it by checking pg_stat_activity and kill it by invoking "select pg_terminate_backend(pid)", being the pid the pid of the stuck transaction
- Fix the category data by executing:

update ad_treenode set parent_id = '5AAC980A56404867815CCF2B52804080' where node_id = '3ECCEC0B766E4A25A697187A58B15B71';
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0050549 closedAugustoMauch Cycles in entities that represents data as a tree can lead to transaction that does not finish, 100% use of CPU 

-  Notes
(0142768)
hgbot (developer)
2022-10-31 16:48

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/745 [^]
(0142866)
hgbot (developer)
2022-11-03 11:38

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: a326f3598aa873ada699c23f63aecfc39839b231
Author: Guillermo Alvarez de Eulate <guillermo.alvarez@openbravo.com>
Date: 31-10-2022 16:47:53
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/a326f3598aa873ada699c23f63aecfc39839b231 [^]

fixed ISSUE-50697: Prevent db transaction from being kept open if cycle is detected in hierarchy

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/TreeDatasourceService.java
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0142867)
hgbot (developer)
2022-11-03 11:38

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

- Issue History
Date Modified Username Field Change
2022-10-31 16:37 guilleaer Type defect => backport
2022-10-31 16:37 guilleaer Target Version => PR22Q3.2
2022-10-31 16:48 hgbot Note Added: 0142768
2022-11-03 11:38 hgbot Resolution open => fixed
2022-11-03 11:38 hgbot Status scheduled => closed
2022-11-03 11:38 hgbot Fixed in Version => PR22Q3.2
2022-11-03 11:38 hgbot Note Added: 0142866
2022-11-03 11:38 hgbot Note Added: 0142867


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker