coderzc commented on code in PR #15678:
URL: https://github.com/apache/pulsar/pull/15678#discussion_r887533022
##########
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java:
##########
@@ -346,6 +353,14 @@ public void channelRead(final ChannelHandlerContext ctx,
Object msg) throws Exce
}
inboundChannel.writeAndFlush(msg)
.addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
+
+ if (service.zeroCopyModeEnabled && service.proxyLogLevel == 0)
{
+ if (!ProxyConnection.isTlsChannel(ctx.channel()) &&
!ProxyConnection.isTlsChannel(inboundChannel)) {
Review Comment:
> what about caching this condition ? the "channel" is constant. we can save
some cycles
Caching the `!ProxyConnection.isTlsChannel(inboundChannel)` ?
--
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]