Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0057991Openbravo ERPA. Platformpublic2025-02-14 12:052025-02-19 12:38
egoitz 
Triage Platform Base 
immediatemajoralways
closedfixed 
5
 
PR25Q2 
Core
No
0057991: Massive import of elements that updated the tree do not allow login into the application
Having thousands of elements in the import entry queue in initial adding or updating in the treenode, causes a error during the login that does not allow to login.

If the import entry is adding entries in the treenode to define, for example a bueinss partner tree estructure a handler is executed.
MenuCacheHandler

https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/blob/master/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/MenuCacheHandler.java [^]

This handler
executes this method:
 menu.invalidateCache();

for the menu that is a GlobalMenu object:
 @Inject
  private GlobalMenu menu;


The GlobalMenu.java is used during the login to build the menu.
If during the execution the previous hanlder is executed the menu is invalidated.

https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/blob/master/modules/org.openbravo.client.application/src/org/openbravo/client/application/GlobalMenu.java#L86 [^]

If the hanlder is executed while the login is doing an action between the line 86 and line 95, you are not able to login.

This is very common having thousand on entries processing very fast.



Use case:
There is a customization in the customer that when creating a business partner, add a entry on the ad_treenode for a custom tree, to define a tree structure for the partners.
-Create a import entry process that update the tree
- Add thousand of entries of that type in initial
- While the entries are processed try to do the login

*It is very probable that you will get the errors attached.
Image and error attached.


No tags attached.
depends on backport 0057993PR25Q1 closed Triage Platform Base Massive import of elements that updated the tree do not allow login into the application 
depends on backport 0057994PR24Q4.2 closed Triage Platform Base Massive import of elements that updated the tree do not allow login into the application 
related to defect 0058030 new Triage Platform Base Potential concurrency issues in GlobalMenu 
png image (4).png (157,028) 2025-02-14 12:05
https://issues.openbravo.com/file_download.php?file_id=20911&type=bug
png

txt error.login.eko.importentries.txt (34,810) 2025-02-14 12:05
https://issues.openbravo.com/file_download.php?file_id=20912&type=bug
Issue History
2025-02-14 12:05egoitzNew Issue
2025-02-14 12:05egoitzAssigned To => Triage Platform Base
2025-02-14 12:05egoitzFile Added: image (4).png
2025-02-14 12:05egoitzModules => Core
2025-02-14 12:05egoitzTriggers an Emergency Pack => No
2025-02-14 12:05egoitzFile Added: error.login.eko.importentries.txt
2025-02-14 12:13egoitzDescription Updatedbug_revision_view_page.php?rev_id=29245#r29245
2025-02-14 12:17egoitzDescription Updatedbug_revision_view_page.php?rev_id=29246#r29246
2025-02-14 13:11hgbotNote Added: 0175655
2025-02-14 13:12alostaleStatusnew => scheduled
2025-02-19 12:38hgbotNote Added: 0175886
2025-02-19 12:38hgbotResolutionopen => fixed
2025-02-19 12:38hgbotStatusscheduled => closed
2025-02-19 12:38hgbotFixed in Version => PR25Q2
2025-02-19 12:38hgbotNote Added: 0175887
2025-02-19 12:46caristuRelationship addedrelated to 0058030

Notes
(0175655)
hgbot   
2025-02-14 13:11   
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/merge_requests/1536 [^]
(0175886)
hgbot   
2025-02-19 12:38   
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/merge_requests/1536 [^]
(0175887)
hgbot   
2025-02-19 12:38   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo [^]
Changeset: a1512949039dcfc3fd2ce2a3fc0b7a3113ac4671
Author: Asier Lostalé <a.lostale@orisha.com>
Date: 19-02-2025 11:38:40
URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/commit/a1512949039dcfc3fd2ce2a3fc0b7a3113ac4671 [^]

fixes BUG-57991: modifications in any tree invalidate menu cache

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/MenuCacheHandler.java
---