You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/02/15 10:26:53 UTC

[GitHub] [ignite] agoncharuk commented on a change in pull request #8759: IGNITE-14131 Fix problems with concurrent ignite.compute call

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:
users@infra.apache.org