[
https://issues.apache.org/jira/browse/STORM-1609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185869#comment-15185869
]
ASF GitHub Bot commented on STORM-1609:
---------------------------------------
Github user d2r commented on a diff in the pull request:
https://github.com/apache/storm/pull/1194#discussion_r55431809
--- Diff: storm-core/src/jvm/org/apache/storm/messaging/netty/Client.java
---
@@ -151,10 +164,35 @@
bootstrap = createClientBootstrap(factory, bufferSize, stormConf);
dstAddress = new InetSocketAddress(host, port);
dstAddressPrefixedName = prefixedName(dstAddress);
+ launchChannelAliveThread();
scheduleConnect(NO_DELAY_MS);
batcher = new MessageBuffer(messageBatchSize);
}
+ /**
+ * This thread helps us to check for channel connection periodically.
+ * This is performed just to know whether the destination address
+ * is alive or attempts to refresh connections if not alive. This
+ * solution is better than what we have now in case of a bad channel.
+ */
+ private void launchChannelAliveThread() {
--- End diff --
Let's move the code in the static block above down here at the beginning of
`launchChannelAliveThread`, so that as @revans2 suggests, the stack trace will
not be so confusing.
```Java
if (timer == null) {
synchronized (Client.class) {
if (timer == null) {
timer = new Timer("Netty-ChannelAlive-Timer", true);
}
}
}
```
> Netty Client is not best effort delivery on failed Connection
> -------------------------------------------------------------
>
> Key: STORM-1609
> URL: https://issues.apache.org/jira/browse/STORM-1609
> Project: Apache Storm
> Issue Type: Bug
> Reporter: Sanket Reddy
> Assignee: Sanket Reddy
>
> f Worker-A has connection to Worker-B that is unused ( and if Worker-B
> restarted), we drop messages because Channel is not in good state. Can we
> avoid message drop until we succeed in making new connection or a timeout?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)