Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BBD4918132 for ; Tue, 30 Jun 2015 12:27:52 +0000 (UTC) Received: (qmail 55983 invoked by uid 500); 30 Jun 2015 12:27:52 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 55952 invoked by uid 500); 30 Jun 2015 12:27:52 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 55899 invoked by uid 99); 30 Jun 2015 12:27:52 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2015 12:27:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1C0D8180348 for ; Tue, 30 Jun 2015 12:27:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.771 X-Spam-Level: * X-Spam-Status: No, score=1.771 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 6tjAeuQ90Muz for ; Tue, 30 Jun 2015 12:27:51 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 38954262ED for ; Tue, 30 Jun 2015 12:27:37 +0000 (UTC) Received: (qmail 54876 invoked by uid 99); 30 Jun 2015 12:27:37 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2015 12:27:37 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 047F2E35EE; Tue, 30 Jun 2015 12:27:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vozerov@apache.org To: commits@ignite.incubator.apache.org Date: Tue, 30 Jun 2015 12:28:19 -0000 Message-Id: <7a7de1273d064098871773246312c157@git.apache.org> In-Reply-To: <8f6e59cd2a334b5880ee17bf326141bc@git.apache.org> References: <8f6e59cd2a334b5880ee17bf326141bc@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [44/49] incubator-ignite git commit: # fixed delays on node stop # 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-gg-10239 Commit: 68c21ac4c924caac6b6e4f7dd287ba1326f4fc11 Parents: 6929a0c Author: Yakov Zhdanov Authored: Mon Jun 29 11:44:17 2015 -0700 Committer: Yakov Zhdanov 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();