ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [20/49] ignite git commit: IGNITE-5554 ServiceProcessor may process failed reassignments in timeout thread
Date Tue, 11 Jul 2017 09:03:18 GMT
IGNITE-5554 ServiceProcessor may process failed reassignments in timeout thread


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/517a23d2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/517a23d2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/517a23d2

Branch: refs/heads/ignite-2.1
Commit: 517a23d252078e62a8addca55ca78497e5226b5b
Parents: 3314a45
Author: mcherkasov <mcherkasov@gridgain.com>
Authored: Fri Jun 30 20:23:55 2017 +0300
Committer: mcherkasov <mcherkasov@gridgain.com>
Committed: Fri Jul 7 17:44:16 2017 +0300

----------------------------------------------------------------------
 .../service/GridServiceProcessor.java           | 24 +++++++++-----------
 1 file changed, 11 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/517a23d2/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index d67f2d1..23a29f8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@ -26,6 +26,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
+import java.util.concurrent.Callable;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.ExecutorService;
@@ -1509,18 +1510,11 @@ public class GridServiceProcessor extends GridProcessorAdapter implements
Ignite
                 }
 
                 @Override public void onTimeout() {
-                    GridSpinBusyLock busyLock = GridServiceProcessor.this.busyLock;
-
-                    if (busyLock == null || !busyLock.enterBusy())
-                        return;
-
-                    try {
-                        // Try again.
-                        onDeployment(dep, topVer);
-                    }
-                    finally {
-                        busyLock.leaveBusy();
-                    }
+                    depExe.execute(new DepRunnable() {
+                        @Override public void run0() {
+                            onDeployment(dep, topVer);
+                        }
+                    });
                 }
             });
         }
@@ -1716,7 +1710,11 @@ public class GridServiceProcessor extends GridProcessorAdapter implements
Ignite
                         }
 
                         @Override public void onTimeout() {
-                            onReassignmentFailed(topVer, retries);
+                            depExe.execute(new Runnable() {
+                                public void run() {
+                                    onReassignmentFailed(topVer, retries);
+                                }
+                            });
                         }
                     });
                 }


Mime
View raw message