You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2015/09/17 04:04:28 UTC
[22/55] [abbrv] ignite git commit: IGNITE-1378 - Fixed exception
handling in GridContinuousProcessor.startRoutine()
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-1171
Commit: 1914c0216608dc8eecf97fb3ee4bdfb6fdec740c
Parents: f8b798d
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Mon Sep 14 23:37:26 2015 -0700
Committer: Valentin Kulichenko <va...@gmail.com>
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
+}