You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/10/30 07:40:00 UTC
[jira] [Created] (OFBIZ-13772) Artifact Info graph loses or corrupts references when artifacts are loaded in parallel
Mridul Pathak created OFBIZ-13772:
-------------------------------------
Summary: Artifact Info graph loses or corrupts references when artifacts are loaded in parallel
Key: OFBIZ-13772
URL: https://issues.apache.org/jira/browse/OFBIZ-13772
Project: OFBiz
Issue Type: Bug
Components: framework/webtools
Affects Versions: Upcoming Branch, 24.09.08
Reporter: Mridul Pathak
Assignee: Mridul Pathak
ArtifactInfoFactory.prepareAll() loads services and components on the global fork-join pool, but each {{get*ArtifactInfo}} method does a get, builds a new info, then a put on its map, so two tasks can build the same artifact and the later one replaces the earlier. The reverse-reference maps are filled with {{UtilMisc.addToSortedSetInMap}}, which does the same check-then-act and then adds to a plain {{TreeSet}} from many tasks at once, so a set can be replaced (losing the references already in it) or corrupted. The Artifact Info screens can also load artifacts on demand while another request iterates the same sets.
The fix registers each info with {{putIfAbsent}} and populates only the registered one, and keeps the reference sets in {{ConcurrentSkipListSet}}s created with {{computeIfAbsent}}.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)