From ab36f95510b107f4c79121fd0f532d591c800b52 Mon Sep 17 00:00:00 2001 From: yujingwei Date: Mon, 9 Sep 2024 19:08:04 +0800 Subject: [PATCH] fix(java-client): fix client query meta server failed when authentication is enabled --- .../main/java/org/apache/pegasus/rpc/async/MetaSession.java | 1 + .../java/org/apache/pegasus/rpc/async/ReplicaSession.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/java-client/src/main/java/org/apache/pegasus/rpc/async/MetaSession.java b/java-client/src/main/java/org/apache/pegasus/rpc/async/MetaSession.java index 31bd9ac331..219c5ea1ac 100644 --- a/java-client/src/main/java/org/apache/pegasus/rpc/async/MetaSession.java +++ b/java-client/src/main/java/org/apache/pegasus/rpc/async/MetaSession.java @@ -249,6 +249,7 @@ void onFinishQueryMeta(final MetaRequestRound round) { return; } + round.lastSession.getInterceptorManager().onConnected(round.lastSession); retryQueryMeta(round, needDelay); } diff --git a/java-client/src/main/java/org/apache/pegasus/rpc/async/ReplicaSession.java b/java-client/src/main/java/org/apache/pegasus/rpc/async/ReplicaSession.java index ff0fd7960a..ab39e086af 100644 --- a/java-client/src/main/java/org/apache/pegasus/rpc/async/ReplicaSession.java +++ b/java-client/src/main/java/org/apache/pegasus/rpc/async/ReplicaSession.java @@ -427,6 +427,10 @@ public boolean tryPendRequest(RequestEntry entry) { return false; } + public ReplicaSessionInterceptorManager getInterceptorManager() { + return interceptorManager; + } + final class DefaultHandler extends SimpleChannelInboundHandler { @Override public void channelInactive(ChannelHandlerContext ctx) throws Exception {