Repository: incubator-ignite Updated Branches: refs/heads/ignite-45-ipc-debug 76931497b -> 307f4f5b9
# IPC debug Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/307f4f5b Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/307f4f5b Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/307f4f5b Branch: refs/heads/ignite-45-ipc-debug Commit: 307f4f5b90c9050022a0e4a7e961699314877d95 Parents: 7693149 Author: Valentin Kulichenko <vkuliche...@gridgain.com> Authored: Mon Mar 23 19:23:31 2015 -0700 Committer: Valentin Kulichenko <vkuliche...@gridgain.com> Committed: Mon Mar 23 19:23:31 2015 -0700 ---------------------------------------------------------------------- .../ipc/shmem/IpcSharedMemoryServerEndpoint.java | 18 ++++++++++++++++-- .../util/ipc/shmem/IpcSharedMemoryUtils.java | 4 +++- .../processors/schedule/GridScheduleSelfTest.java | 10 +++++----- 3 files changed, 24 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/307f4f5b/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 1aa8db1..2b225f4 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 @@ -502,6 +502,9 @@ public class IpcSharedMemoryServerEndpoint implements IpcServerEndpoint { * */ private class GcWorker extends GridWorker { + /** */ + private boolean lastRunDone; + /** * @param gridName Grid name. * @param name Name. @@ -520,8 +523,13 @@ public class IpcSharedMemoryServerEndpoint implements IpcServerEndpoint { assert workTokDir != null; - while (!isCancelled()) { - U.sleep(GC_FREQ); + while (!lastRunDone) { + try { + U.sleep(GC_FREQ); + } + catch (IgniteInterruptedCheckedException e) { + // No-op. + } if (log.isDebugEnabled()) log.debug("Starting GC iteration."); @@ -543,6 +551,12 @@ public class IpcSharedMemoryServerEndpoint implements IpcServerEndpoint { log.debug("Removed endpoint: " + e); } } + + if (isCancelled()) { + lastRunDone = true; + + break; + } } } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/307f4f5b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryUtils.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryUtils.java index 169fc0a..77c73d1 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryUtils.java @@ -245,7 +245,7 @@ public class IpcSharedMemoryUtils { } /** - * @param workTokDir Work token directory. + * @param workTokDir Token directory (common for multiple nodes). * @param tokDir Current node token directory. * @param log Logger. */ @@ -279,6 +279,8 @@ public class IpcSharedMemoryUtils { /** * @param workTokDir Token directory (common for multiple nodes). + * @param tokDir Current node token directory. + * @param log Logger. */ private static void processTokenDirectory(File workTokDir, File tokDir, IgniteLogger log) { for (File f : workTokDir.listFiles()) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/307f4f5b/modules/schedule/src/test/java/org/apache/ignite/internal/processors/schedule/GridScheduleSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/schedule/src/test/java/org/apache/ignite/internal/processors/schedule/GridScheduleSelfTest.java b/modules/schedule/src/test/java/org/apache/ignite/internal/processors/schedule/GridScheduleSelfTest.java index c887b2d..b7d77f1 100644 --- a/modules/schedule/src/test/java/org/apache/ignite/internal/processors/schedule/GridScheduleSelfTest.java +++ b/modules/schedule/src/test/java/org/apache/ignite/internal/processors/schedule/GridScheduleSelfTest.java @@ -61,7 +61,7 @@ public class GridScheduleSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ - public void testRunLocal() throws Exception { + public void _testRunLocal() throws Exception { for (int i = 0; i < NODES_CNT; i++) { IgniteFuture<?> fut = grid(i).scheduler().runLocal(new TestRunnable()); @@ -74,7 +74,7 @@ public class GridScheduleSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ - public void testCallLocal() throws Exception { + public void _testCallLocal() throws Exception { for (int i = 0; i < NODES_CNT; i++) { IgniteFuture<?> fut = grid(i).scheduler().callLocal(new TestCallable()); @@ -87,7 +87,7 @@ public class GridScheduleSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ - public void testScheduleRunnable() throws Exception { + public void _testScheduleRunnable() throws Exception { final CountDownLatch latch = new CountDownLatch(1); SchedulerFuture<?> fut = null; @@ -152,7 +152,7 @@ public class GridScheduleSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ - public void testScheduleCallable() throws Exception { + public void _testScheduleCallable() throws Exception { SchedulerFuture<Integer> fut = null; long freq = 60; // 1 minute frequency. @@ -209,7 +209,7 @@ public class GridScheduleSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ - public void testRunnableCancel() throws Exception { + public void _testRunnableCancel() throws Exception { SchedulerFuture fut = null; final GridTuple<Integer> tpl = new GridTuple<>(0);