diff --git a/dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/future/ResponseFuture.java b/dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/future/ResponseFuture.java index f9de653d90..5e5462c7e8 100644 --- a/dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/future/ResponseFuture.java +++ b/dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/future/ResponseFuture.java @@ -105,6 +105,10 @@ public class ResponseFuture { return FUTURE_TABLE.get(opaque); } + public void removeFuture() { + FUTURE_TABLE.remove(opaque); + } + /** * whether timeout * diff --git a/dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyClientHandler.java b/dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyClientHandler.java index e122df4f29..ad9787d705 100644 --- a/dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyClientHandler.java +++ b/dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyClientHandler.java @@ -136,6 +136,7 @@ public class NettyClientHandler extends ChannelInboundHandlerAdapter { future.setResponseCommand(command); future.release(); if (future.getInvokeCallback() != null) { + future.removeFuture(); this.callbackExecutor.submit(future::executeInvokeCallback); } else { future.putResponse(command);