xiangfu0 commented on code in PR #12404:
URL: https://github.com/apache/pinot/pull/12404#discussion_r1486994741
##########
pinot-core/src/main/java/org/apache/pinot/core/transport/ChannelHandlerFactory.java:
##########
@@ -61,14 +64,22 @@ public static ChannelHandler getLengthFieldPrepender() {
* The {@code getClientTlsHandler} return a Client side Tls handler that
encrypt and decrypt everything.
*/
public static ChannelHandler getClientTlsHandler(TlsConfig tlsConfig,
SocketChannel ch) {
- return TlsUtils.buildClientContext(tlsConfig).newHandler(ch.alloc());
+ // Make a copy of the TlsConfig because the TlsConfig is mutable, when the
TlsConfig is used as the key of the
+ // CLIENT_SSL_CONTEXTS_CACHE, the TlsConfig should not be changed.
+ TlsConfig tlsConfigCopy = new TlsConfig(tlsConfig);
Review Comment:
what's the frequency of this call and object copy?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]