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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0050549
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformcriticalhave not tried2022-10-17 11:162022-10-31 16:41
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in VersionPR23Q1
StatusclosedFix in branchFixed in SCM revision1abcb2781571
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

0050549: 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 ]
depends on backport 0050696PR22Q4.1 closedAugustoMauch Cycles in entities that represents data as a tree can lead to transaction that does not finish, 100% use of CPU 
depends on backport 0050697PR22Q3.2 closedAugustoMauch Cycles in entities that represents data as a tree can lead to transaction that does not finish, 100% use of CPU 
causes defect 0050921 closedAugustoMauch Filter in valid tree structure results in message related to cycles in the hierarchy 

-  Notes
(0142534)
hgbot (developer)
2022-10-25 09:41

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/741 [^]
(0142587)
hgbot (developer)
2022-10-26 09:17

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/741 [^]
(0142588)
hgbot (developer)
2022-10-26 09:17

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 1abcb2781571fe91d5c1e3da8f94187b9d77b10c
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 25-10-2022 09:41:50
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/1abcb2781571fe91d5c1e3da8f94187b9d77b10c [^]

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

Now when a cycle is detected in a hierarchy, an exception is thrown to show a proper message to the user

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/TreeDatasourceService.java
M src-db/database/sourcedata/AD_MESSAGE.xml
---

- Issue History
Date Modified Username Field Change
2022-10-17 11:16 AugustoMauch New Issue
2022-10-17 11:16 AugustoMauch Assigned To => AugustoMauch
2022-10-17 11:16 AugustoMauch Modules => Core
2022-10-17 11:16 AugustoMauch Triggers an Emergency Pack => No
2022-10-25 09:34 AugustoMauch Steps to Reproduce Updated View Revisions
2022-10-25 09:34 AugustoMauch Status new => scheduled
2022-10-25 09:36 AugustoMauch Steps to Reproduce Updated View Revisions
2022-10-25 09:41 hgbot Note Added: 0142534
2022-10-26 09:17 hgbot Resolution open => fixed
2022-10-26 09:17 hgbot Status scheduled => closed
2022-10-26 09:17 hgbot Note Added: 0142587
2022-10-26 09:17 hgbot Fixed in Version => PR23Q1
2022-10-26 09:17 hgbot Note Added: 0142588
2022-10-31 16:37 guilleaer Status closed => new
2022-10-31 16:37 guilleaer Resolution fixed => open
2022-10-31 16:37 guilleaer Fixed in Version PR23Q1 =>
2022-10-31 16:37 guilleaer Status new => scheduled
2022-10-31 16:41 guilleaer Status scheduled => resolved
2022-10-31 16:41 guilleaer Fixed in Version => PR23Q1
2022-10-31 16:41 guilleaer Fixed in SCM revision => 1abcb2781571fe91d5c1e3da8f94187b9d77b10c
2022-10-31 16:41 guilleaer Resolution open => fixed
2022-10-31 16:41 guilleaer Status resolved => closed
2022-11-16 16:31 AugustoMauch Relationship added causes 0050921


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker