kirktrue commented on code in PR #14359:
URL: https://github.com/apache/kafka/pull/14359#discussion_r1323634434
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/NetworkClientDelegate.java:
##########
@@ -63,6 +68,31 @@ public NetworkClientDelegate(
this.unsentRequests = new ArrayDeque<>();
this.requestTimeoutMs =
config.getInt(ConsumerConfig.REQUEST_TIMEOUT_MS_CONFIG);
this.retryBackoffMs =
config.getLong(ConsumerConfig.RETRY_BACKOFF_MS_CONFIG);
+ this.tryConnectNodes = new HashSet<>();
+ }
+
+ @Override
+ public boolean isUnavailable(Node node) {
+ return NetworkClientUtils.isUnavailable(client, node, time);
+ }
+
+ @Override
+ public void maybeThrowAuthFailure(Node node) {
+ NetworkClientUtils.maybeThrowAuthFailure(client, node);
+ }
+
+ @Override
+ public void tryConnect(Node node) {
+ tryConnectNodes.add(node);
+ }
+
+ public void maybeTryConnect() {
Review Comment:
Yes, it was. Thanks for catching this. It's now executed in the
`DefaultBackgroundThread` right before we send out requests.
This is an artifact of manually merging different commits from the staging
branch into a single PR for `trunk` 😞
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/NetworkClientDelegate.java:
##########
@@ -63,6 +68,31 @@ public NetworkClientDelegate(
this.unsentRequests = new ArrayDeque<>();
this.requestTimeoutMs =
config.getInt(ConsumerConfig.REQUEST_TIMEOUT_MS_CONFIG);
this.retryBackoffMs =
config.getLong(ConsumerConfig.RETRY_BACKOFF_MS_CONFIG);
+ this.tryConnectNodes = new HashSet<>();
+ }
+
+ @Override
+ public boolean isUnavailable(Node node) {
+ return NetworkClientUtils.isUnavailable(client, node, time);
+ }
+
+ @Override
+ public void maybeThrowAuthFailure(Node node) {
+ NetworkClientUtils.maybeThrowAuthFailure(client, node);
+ }
+
+ @Override
+ public void tryConnect(Node node) {
+ tryConnectNodes.add(node);
+ }
+
+ public void maybeTryConnect() {
Review Comment:
Yes, it was. Thanks for catching this. It's now executed in the
`DefaultBackgroundThread` right before we send out requests.
This is an artifact of manually merging different commits from the staging
branch into a single PR for `trunk` 😞
--
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]