agoncharuk commented on a change in pull request #8759:
URL: https://github.com/apache/ignite/pull/8759#discussion_r576088085



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentLocalStore.java
##########
@@ -232,23 +232,33 @@
 
     /** {@inheritDoc} */
     @Override public GridDeployment 
searchDeploymentCache(GridDeploymentMetadata meta) {
-        return deployment(meta.alias());
+        return deployment(meta);
     }
 
     /**
-     * @param alias Class alias.
+     * @param meta Deployment meta.
      * @return Deployment.
      */
-    @Nullable private GridDeployment deployment(String alias) {
-        Deque<GridDeployment> deps = cache.get(alias);
+    @Nullable private GridDeployment deployment(final GridDeploymentMetadata 
meta) {
+        Deque<GridDeployment> deps = cache.get(meta.alias());
 
         if (deps != null) {
-            GridDeployment dep = deps.peekFirst();
+            for (GridDeployment dep : deps) {
+                // local or remote deployment.
+                if (dep.classLoaderId() == meta.classLoaderId() || 
dep.classLoader() == meta.classLoader()) {

Review comment:
       Shouldn't we also check for dep.undeployed(), as it was done in the 
original approach?




----------------------------------------------------------------
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.

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


Reply via email to