From ffdd31005a5ea378325b394a26c1116bc2c9506f Mon Sep 17 00:00:00 2001 From: lindseyr Date: Wed, 23 Oct 2024 10:18:41 -0700 Subject: [PATCH] Add more logging --- .../zuul/netty/server/ClientConnectionsShutdown.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientConnectionsShutdown.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientConnectionsShutdown.java index 6207f4ff33..81bc7db624 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientConnectionsShutdown.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientConnectionsShutdown.java @@ -30,10 +30,11 @@ import io.netty.util.concurrent.EventExecutor; import io.netty.util.concurrent.Promise; import io.netty.util.concurrent.ScheduledFuture; -import java.util.concurrent.TimeUnit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.concurrent.TimeUnit; + /** * TODO: Change this class to be an instance per-port. * So that then the configuration can be different per-port, which is need for the combined FTL/Cloud clusters. @@ -110,6 +111,7 @@ Promise gracefullyShutdownClientChannels(ShutdownType shutdownType) { flagChannelForClose(channel, shutdownType); } + LOG.info("Setting up scheduled task for {} with shutdownType: {}", closeFuture, shutdownType); Promise promise = executor.newPromise(); Runnable cancelTimeoutTask; if (shutdownType == ShutdownType.SHUTDOWN) { @@ -129,6 +131,7 @@ Promise gracefullyShutdownClientChannels(ShutdownType shutdownType) { TimeUnit.SECONDS); cancelTimeoutTask = () -> { if (!timeoutTask.isDone()) { + LOG.info("Timeout task canceled before completion."); // close happened before the timeout timeoutTask.cancel(false); } @@ -138,6 +141,7 @@ Promise gracefullyShutdownClientChannels(ShutdownType shutdownType) { } closeFuture.addListener(future -> { + LOG.info("CloseFuture completed successfully: {}", future.isSuccess()); cancelTimeoutTask.run(); promise.setSuccess(null); });