You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/10/08 08:47:40 UTC
[GitHub] [pulsar] eolivelli commented on a change in pull request #12301: [Transaction] Transaction coordinator client connect add response command.
eolivelli commented on a change in pull request #12301:
URL: https://github.com/apache/pulsar/pull/12301#discussion_r724822219
##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/TransactionMetaStoreHandler.java
##########
@@ -119,31 +120,41 @@ public void connectionOpened(ClientCnx cnx) {
connectionHandler.setClientCnx(cnx);
cnx.registerTransactionMetaStoreHandler(transactionCoordinatorId, this);
- long requestId = client.newRequestId();
- ByteBuf request = Commands.newTcClientConnect(transactionCoordinatorId, requestId);
- cnx.sendRequestWithId(request, requestId).thenRun(() -> {
- LOG.info("Transaction coordinator client connect success! tcId : {}", transactionCoordinatorId);
- if (!changeToReadyState()) {
- setState(State.Closed);
- cnx.channel().close();
- }
+ // if broker protocol version < 19, don't send TcClientConnectRequest to broker.
+ if (cnx.getRemoteEndpointProtocolVersion() > ProtocolVersion.v18.getValue()) {
Review comment:
this is great
--
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