You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vk...@apache.org on 2015/09/08 22:35:51 UTC
ignite git commit: IGNITE-1378 - Fixed exception handling in
GridContinuousProcessor.startRoutine()
Repository: ignite
Updated Branches:
refs/heads/ignite-1378 [created] 4f652966c
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/4f652966
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4f652966
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4f652966
Branch: refs/heads/ignite-1378
Commit: 4f652966c956e8a04576c1b60089ba34d052b7a1
Parents: e4e39af
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Tue Sep 8 13:35:35 2015 -0700
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Tue Sep 8 13:35:35 2015 -0700
----------------------------------------------------------------------
.../continuous/GridContinuousProcessor.java | 22 +++++++-------------
1 file changed, 7 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4f652966/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
+}