You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "RobertIndie (via GitHub)" <gi...@apache.org> on 2023/02/21 03:50:28 UTC

[GitHub] [pulsar] RobertIndie commented on a diff in pull request #19540: [fix][proxy] Fix using wrong client version in pulsar proxy

RobertIndie commented on code in PR #19540:
URL: https://github.com/apache/pulsar/pull/19540#discussion_r1112505757


##########
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyClientCnx.java:
##########
@@ -66,7 +65,7 @@ protected ByteBuf newConnectCommand() throws Exception {
         authenticationDataProvider = authentication.getAuthData(remoteHostName);
         AuthData authData = authenticationDataProvider.authenticate(AuthData.INIT_AUTH_DATA);
         return Commands.newConnect(authentication.getAuthMethodName(), authData, protocolVersion,
-                PulsarVersion.getVersion(), proxyToTargetBrokerAddress, clientAuthRole, clientAuthData,
+                proxyConnection.clientVersion, proxyToTargetBrokerAddress, clientAuthRole, clientAuthData,

Review Comment:
   The `clientVersion` here is different from the `protocol version`. There is another field called `protoclVersion` here:
   https://github.com/apache/pulsar/blob/954f406fab03ce8858883335ce6d5a676bb45c92/pulsar-common/src/main/proto/PulsarApi.proto#L273
   The proxy will choose the lowest protocol version for itself and the client:
   https://github.com/apache/pulsar/blob/954f406fab03ce8858883335ce6d5a676bb45c92/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java#L685-L687
   



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org