SammyVimes commented on a change in pull request #575:
URL: https://github.com/apache/ignite-3/pull/575#discussion_r790874703
##########
File path:
modules/network/src/main/java/org/apache/ignite/internal/network/netty/HandshakeHandler.java
##########
@@ -100,13 +106,15 @@ public void exceptionCaught(ChannelHandlerContext ctx,
Throwable cause) {
/**
* Handle {@link HandshakeAction}.
*
- * @param action Handshake action.
+ * @param result Handshake result.
* @param ctx Netty channel context.
*/
- private void handleHandshakeAction(HandshakeAction action,
ChannelHandlerContext ctx) {
+ private void handleHandshakeAction(HandshakeResult result,
ChannelHandlerContext ctx) {
+ HandshakeAction action = result.action();
switch (action) {
case REMOVE_HANDLER:
- ctx.pipeline().remove(this);
+ ChannelInboundHandlerAdapter newHandler =
newHandlerCreator.apply(result.consistentId());
+ ctx.pipeline().replace(this, null, newHandler);
Review comment:
There could be no race condition, because these methods can only be
called from one thread
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]