ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [3/8] incubator-ignite git commit: # fixed delays on node stop
Date Tue, 30 Jun 2015 08:21:51 GMT
# fixed delays on node stop


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

Branch: refs/heads/ignite-1031
Commit: 68c21ac4c924caac6b6e4f7dd287ba1326f4fc11
Parents: 6929a0c
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Mon Jun 29 11:44:17 2015 -0700
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Mon Jun 29 11:44:17 2015 -0700

----------------------------------------------------------------------
 .../util/ipc/shmem/IpcSharedMemoryServerEndpoint.java     | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/68c21ac4/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
index 102c5b1..8c3f29e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
@@ -531,7 +531,9 @@ public class IpcSharedMemoryServerEndpoint implements IpcServerEndpoint
{
 
             while (true) {
                 try {
-                    Thread.sleep(GC_FREQ);
+                    // Sleep only if not cancelled.
+                    if (lastRunNeeded)
+                        Thread.sleep(GC_FREQ);
                 }
                 catch (InterruptedException ignored) {
                     // No-op.
@@ -559,8 +561,12 @@ public class IpcSharedMemoryServerEndpoint implements IpcServerEndpoint
{
                 }
 
                 if (isCancelled()) {
-                    if (lastRunNeeded)
+                    if (lastRunNeeded) {
                         lastRunNeeded = false;
+
+                        // Clear interrupted status.
+                        Thread.interrupted();
+                    }
                     else {
                         Thread.currentThread().interrupt();
 


Mime
View raw message