oleg-vlsk commented on code in PR #12760:
URL: https://github.com/apache/ignite/pull/12760#discussion_r2836704073


##########
modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentLocalStore.java:
##########
@@ -296,23 +299,49 @@ private GridDeployment deploy(
             try {
                 Deque<GridDeployment> cachedDeps = null;
 
-                // Find existing class loader info.
-                for (Deque<GridDeployment> deps : cache.values()) {
-                    for (GridDeployment d : deps) {
-                        if (d.classLoader() == ldr) {
-                            // Cache class and alias.
-                            fireEvt = d.addDeployedClass(cls, alias);
+                Deque<GridDeployment> depsByLdr = cacheByLdr.get(ldr);

Review Comment:
   Not necessarily. In `GridDeploymentLocalStore#cache` we can have several 
deployments with the same classloader associated with one alias/class name (see 
attached screenshots). Most recent deployment are added to the beginning of the 
queue (the `addFirst()` call in `GridDeploymentLocalStore#deploy`).
   
   <img width="1203" height="852" alt="local deployments cache - 1" 
src="https://github.com/user-attachments/assets/d9435325-bb3b-412e-be71-59ddf391cca1";
 />
   
   <img width="1175" height="862" alt="local deployments cache - 2" 
src="https://github.com/user-attachments/assets/0d7877ae-72cd-4540-ba02-e2705eb3d5c3";
 />



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to