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 E7ABC10F00 for ; Tue, 15 Sep 2015 06:37:49 +0000 (UTC) Received: (qmail 72251 invoked by uid 500); 15 Sep 2015 06:37:43 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 72220 invoked by uid 500); 15 Sep 2015 06:37:43 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 72211 invoked by uid 99); 15 Sep 2015 06:37:43 -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, 15 Sep 2015 06:37:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6C22AE076F; Tue, 15 Sep 2015 06:37:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vkulichenko@apache.org To: commits@ignite.apache.org Message-Id: <31eb2e037c9244e19a21e4e108002d14@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ignite git commit: IGNITE-1378 - Fixed exception handling in GridContinuousProcessor.startRoutine() Date: Tue, 15 Sep 2015 06:37:43 +0000 (UTC) Repository: ignite Updated Branches: refs/heads/ignite-1.4 f8b798d75 -> 1914c0216 IGNITE-1378 - Fixed exception handling in GridContinuousProcessor.startRoutine() Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1914c021 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1914c021 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1914c021 Branch: refs/heads/ignite-1.4 Commit: 1914c0216608dc8eecf97fb3ee4bdfb6fdec740c Parents: f8b798d Author: Valentin Kulichenko Authored: Mon Sep 14 23:37:26 2015 -0700 Committer: Valentin Kulichenko Committed: Mon Sep 14 23:37:26 2015 -0700 ---------------------------------------------------------------------- .../continuous/GridContinuousProcessor.java | 22 +++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/1914c021/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java index 3dcfff8..18c1f36 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java @@ -566,30 +566,22 @@ public class GridContinuousProcessor extends GridProcessorAdapter { startFuts.put(routineId, fut); try { + if (locIncluded && registerHandler(ctx.localNodeId(), routineId, hnd, bufSize, interval, autoUnsubscribe, true)) + hnd.onListenerRegistered(routineId, ctx); + ctx.discovery().sendCustomEvent(new StartRoutineDiscoveryMessage(routineId, reqData)); } - catch (IgniteCheckedException e) { // Marshaller exception may occurs if user pass unmarshallable filter. + catch (IgniteCheckedException e) { startFuts.remove(routineId); - locInfos.remove(routineId); + unregisterHandler(routineId, hnd, true); + fut.onDone(e); return fut; } - // Register local handler if needed. - if (locIncluded) { - try { - if (registerHandler(ctx.localNodeId(), routineId, hnd, bufSize, interval, autoUnsubscribe, true)) - hnd.onListenerRegistered(routineId, ctx); - } - catch (IgniteCheckedException e) { - return new GridFinishedFuture<>( - new IgniteCheckedException("Failed to register handler locally: " + hnd, e)); - } - } - // Handler is registered locally. fut.onLocalRegistered(); @@ -1624,4 +1616,4 @@ public class GridContinuousProcessor extends GridProcessorAdapter { return S.toString(SyncMessageAckFuture.class, this); } } -} \ No newline at end of file +}