Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0057993Openbravo ERPA. Platformpublic2025-02-14 12:052025-02-19 12:40
egoitz 
Triage Platform Base 
immediatemajoralways
closedfixed 
5
 
PR25Q1PR25Q1 
Core
No
0057993: 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.
blocks defect 0057991 closed Triage Platform Base Massive import of elements that updated the tree do not allow login into the application 
Issue History
2025-02-14 13:12alostaleTypedefect => backport
2025-02-14 13:12alostaleTarget Version => PR25Q1
2025-02-14 13:40hgbotNote Added: 0175661
2025-02-19 12:40hgbotResolutionopen => fixed
2025-02-19 12:40hgbotStatusscheduled => closed
2025-02-19 12:40hgbotFixed in Version => PR25Q1
2025-02-19 12:40hgbotNote Added: 0175888
2025-02-19 12:40hgbotNote Added: 0175889

Notes
(0175661)
hgbot   
2025-02-14 13:40   
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/merge_requests/1537 [^]
(0175888)
hgbot   
2025-02-19 12:40   
Directly closing issue as related merge request is already approved.

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

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

Whenever any tree is modified, the menu cache is invalidated which can cause
issues while logging in back office.

Now we only invalidate the menu cache in case the modfied tree is the one for
the menu.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/MenuCacheHandler.java
---
(0175889)
hgbot   
2025-02-19 12:40   
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/merge_requests/1537 [^]