You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2015/05/25 10:46:58 UTC
incubator-ignite git commit: # IGNITE-709 Revert: Bug fix avoid hang
GridContinuousProcessor
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-709_2 a154d2c95 -> d411238ea
# IGNITE-709 Revert: Bug fix avoid hang GridContinuousProcessor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d411238e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d411238e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d411238e
Branch: refs/heads/ignite-709_2
Commit: d411238ea00b406256e7314c336f2879be31a896
Parents: a154d2c
Author: sevdokimov <se...@gridgain.com>
Authored: Mon May 25 11:46:12 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon May 25 11:46:12 2015 +0300
----------------------------------------------------------------------
.../continuous/GridContinuousProcessor.java | 44 +-------------------
1 file changed, 1 insertion(+), 43 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d411238e/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 d5c2488..d67a45a 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
@@ -92,8 +92,6 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
/** Number of retries using to send messages. */
private int retryCnt = 3;
- private ExecutorService sendNotificationThreadPool;
-
/**
* @param ctx Kernal context.
*/
@@ -111,9 +109,6 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
marsh = ctx.config().getMarshaller();
- sendNotificationThreadPool = new ThreadPoolExecutor(0, 1, 2000, TimeUnit.MILLISECONDS,
- new LinkedBlockingQueue<Runnable>(), new IgniteThreadFactory(ctx.gridName(), "notification-sender"));
-
ctx.event().addLocalEventListener(new GridLocalEventListener() {
@SuppressWarnings({"fallthrough", "TooBroadScope"})
@Override public void onEvent(Event evt) {
@@ -273,8 +268,6 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
if (log.isDebugEnabled())
log.debug("Continuous processor stopped.");
-
- sendNotificationThreadPool.shutdownNow();
}
/** {@inheritDoc} */
@@ -585,7 +578,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
Collection<Object> toSnd = info.add(obj);
if (toSnd != null)
- sendNotificationAsync(nodeId, routineId, null, toSnd, orderedTopic, msg);
+ sendNotification(nodeId, routineId, null, toSnd, orderedTopic, msg);
}
}
}
@@ -616,41 +609,6 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
}
/**
- * @param nodeId Node ID.
- * @param routineId Routine ID.
- * @param futId Future ID.
- * @param toSnd Notification object to send.
- * @param orderedTopic Topic for ordered notifications.
- * If {@code null}, non-ordered message will be sent.
- * @throws IgniteCheckedException In case of error.
- */
- private void sendNotificationAsync(final UUID nodeId,
- final UUID routineId,
- @Nullable final IgniteUuid futId,
- final Collection<Object> toSnd,
- @Nullable final Object orderedTopic,
- final boolean msg) {
- assert nodeId != null;
- assert routineId != null;
- assert toSnd != null;
- assert !toSnd.isEmpty();
-
- sendNotificationThreadPool.execute(new Runnable() {
- @Override public void run() {
- try {
- sendWithRetries(nodeId,
- new GridContinuousMessage(MSG_EVT_NOTIFICATION, routineId, futId, toSnd, msg),
- orderedTopic);
- }
- catch (IgniteCheckedException e) {
- U.error(log, "Failed to send event notification to node: " + nodeId, e);
- }
- }
- });
-
- }
-
- /**
* @param node Sender.
* @param req Start request.
*/