You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "kirktrue (via GitHub)" <gi...@apache.org> on 2023/08/29 01:41:05 UTC

[GitHub] [kafka] kirktrue opened a new pull request, #14305: KAFKA-14274 #1: basic refactoring

kirktrue opened a new pull request, #14305:
URL: https://github.com/apache/kafka/pull/14305

   This change introduces some basic clean up and refactoring for forthcoming commits related to the revised fetch code for the consumer threading refactor project.
   
   See KAFKA-14274 for more background.


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] philipnee commented on pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "philipnee (via GitHub)" <gi...@apache.org>.
philipnee commented on PR #14305:
URL: https://github.com/apache/kafka/pull/14305#issuecomment-1698113996

   Hey @kirktrue - Thanks for the PR. Left a couple of comments otherwise it looks good.


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on PR #14305:
URL: https://github.com/apache/kafka/pull/14305#issuecomment-1700103001

   Test failures are unrelated:
   
   ```
   kafka.api.ConsumerBounceTest.testConsumptionWithBrokerFailures()
   kafka.server.DynamicBrokerReconfigurationTest.testThreadPoolResize()
   o.a.k.connect.mirror.integration.IdentityReplicationIntegrationTest.testReplicateSourceDefault()
   o.a.k.controller.QuorumControllerTest.testBalancePartitionLeaders()
   o.a.k.server.log.remote.metadata.storage.TopicBasedRemoteLogMetadataManagerTest.testNewPartitionUpdates()
   o.a.k.streams.integration.EOSUncleanShutdownIntegrationTest.shouldWorkWithUncleanShutdownWipeOutStateStore()
   o.a.k.streams.processor.internals.StreamsAssignmentScaleTest.testHighAvailabilityTaskAssignorLargeNumConsumers
   o.a.k.trogdor.coordinator.CoordinatorTest.testTaskRequestWithOldStartMsGetsUpdated()
   ```
   
   


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1309231831


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/FetchUtils.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.clients.consumer.internals;
+
+import org.apache.kafka.common.TopicPartition;
+
+public class FetchUtils {

Review Comment:
   Done.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] divijvaidya commented on pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on PR #14305:
URL: https://github.com/apache/kafka/pull/14305#issuecomment-1714262640

   > Does this metric measure the trunk or all draft/pr?
   
   Thank you for looking into this @philipnee. You can add "trunk" as a tag in the above link to get data on trunk. Trunk seems all green, in which case, seems like it flaky only on PRs. Doesn't seem like this PR is related in that case. The timeline just happens to match up :) 
   
   I appreciate your effort towards this investigation. Thank you!


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] philipnee commented on pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "philipnee (via GitHub)" <gi...@apache.org>.
philipnee commented on PR #14305:
URL: https://github.com/apache/kafka/pull/14305#issuecomment-1714274031

   @divijvaidya - thank you for looking into this proactively! 🤝 


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1308110256


##########
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java:
##########


Review Comment:
   Author’s note: this method is used in the new `Consumer`’s constructor in a future commit.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java:
##########


Review Comment:
   Author’s note: this method is used in the new `Consumer`’s constructor in a future commit.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1308109624


##########
clients/src/main/java/org/apache/kafka/clients/NetworkClientUtils.java:
##########


Review Comment:
   Author’s note: The two new methods in this file were moved here from `ConsumerNetworkClient` as they will be used in other classes in future commits.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue closed pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue closed pull request #14305: KAFKA-14274: [1/7] basic refactoring
URL: https://github.com/apache/kafka/pull/14305


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] philipnee commented on a diff in pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "philipnee (via GitHub)" <gi...@apache.org>.
philipnee commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1309343270


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -66,13 +65,19 @@ public boolean canSendRequest(final long currentTimeMs) {
             return true;
         }
 
-        if (this.lastReceivedMs == -1 ||
-                this.lastReceivedMs < this.lastSentMs) {
-            // there is an inflight request
+        if (this.lastReceivedMs == -1 || this.lastReceivedMs < this.lastSentMs) {
+            log.debug("An inflight request already exists; lastReceivedMs: {}, lastSentMs:  {}", lastReceivedMs, lastSentMs);
             return false;
         }
 
-        return requestBackoffExpired(currentTimeMs);
+        long remainingBackoffMs = remainingBackoffMs(currentTimeMs);
+
+        if (remainingBackoffMs <= 0) {
+            return true;
+        } else {
+            log.debug("There are {} ms remaining before another attempt can be sent", remainingBackoffMs);

Review Comment:
   ditto ^^



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on PR #14305:
URL: https://github.com/apache/kafka/pull/14305#issuecomment-1710825657

   Test failures in latest build are unrelated:
   
   ```
   integration.kafka.server.FetchFromFollowerIntegrationTest.testRackAwareRangeAssignor()
   kafka.api.DelegationTokenEndToEndAuthorizationWithOwnerTest.testNoGroupAcl()
   kafka.api.TransactionsTest.testBumpTransactionalEpoch()
   kafka.api.TransactionsTest.testCommitTransactionTimeout()
   kafka.controller.ControllerIntegrationTest.testTopicIdPersistsThroughControllerRestart()
   kafka.network.ConnectionQuotasTest.testListenerConnectionRateLimitWhenActualRateAboveLimit()
   kafka.server.DescribeClusterRequestTest.testDescribeClusterRequestExcludingClusterAuthorizedOperations()
   kafka.server.ProduceRequestTest.testSimpleProduceRequest()
   o.a.k.clients.consumer.internals.AbstractCoordinatorTest.testWakeupAfterSyncGroupSentExternalCompletion()
   o.a.k.connect.integration.ConnectorRestartApiIntegrationTest.testMultiWorkerRestartOnlyConnector()
   o.a.k.controller.QuorumControllerTest.testBalancePartitionLeaders()
   ```


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] philipnee commented on pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "philipnee (via GitHub)" <gi...@apache.org>.
philipnee commented on PR #14305:
URL: https://github.com/apache/kafka/pull/14305#issuecomment-1714240650

   Hey @divijvaidya - Looking at the PR: in fact there isn't any implementation level changes, so I'm not sure why these two functions started to become flaky.  Does this metric measure the trunk or all draft/pr? I did open a PR that has broken BaseAsyncConsumerTest.


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1308111718


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -66,13 +65,19 @@ public boolean canSendRequest(final long currentTimeMs) {
             return true;
         }
 
-        if (this.lastReceivedMs == -1 ||

Review Comment:
   Author’s note: formatting and added debug



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -66,13 +65,19 @@ public boolean canSendRequest(final long currentTimeMs) {
             return true;
         }
 
-        if (this.lastReceivedMs == -1 ||

Review Comment:
   Author’s note: formatting and added debug



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue closed pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue closed pull request #14305: KAFKA-14274 #1: basic refactoring
URL: https://github.com/apache/kafka/pull/14305


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] clolov commented on a diff in pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "clolov (via GitHub)" <gi...@apache.org>.
clolov commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1318543584


##########
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java:
##########
@@ -639,9 +639,9 @@ private void maybeOverrideClientId(Map<String, Object> configs) {
         }
     }
 
-    protected static Map<String, Object> appendDeserializerToConfig(Map<String, Object> configs,
-                                                                    Deserializer<?> keyDeserializer,
-                                                                    Deserializer<?> valueDeserializer) {
+    public static Map<String, Object> appendDeserializerToConfig(Map<String, Object> configs,

Review Comment:
   I assume this visibility change is needed for a subsequent commit?



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1316364678


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -363,6 +365,20 @@ private CompletableFuture<Map<TopicPartition, OffsetAndMetadata>> chainFuture(fi
                 }
             });
         }
+
+        @Override
+        public String toString() {
+            return "OffsetFetchRequestState{" +
+                    "requestedPartitions=" + requestedPartitions +
+                    ", requestedGeneration=" + requestedGeneration +
+                    ", future=" + future +
+                    ", exponentialBackoff=" + exponentialBackoff +
+                    ", lastSentMs=" + lastSentMs +
+                    ", lastReceivedMs=" + lastReceivedMs +
+                    ", numAttempts=" + numAttempts +
+                    ", backoffMs=" + backoffMs +

Review Comment:
   @junrao Are you referring to the `toString()` code specifically, or something else?



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] divijvaidya commented on pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on PR #14305:
URL: https://github.com/apache/kafka/pull/14305#issuecomment-1713580386

   Hey @kirktrue 
   `BaseAsyncConsumerTest` have started becoming flaky [1] since this commit was introduced on Sept 8th. The flakiness may or may not be related since I haven't investigated in details but can you please check to ensure that this commit didn't cause a flakiness.
   
   Thanks.
   
   ![Screenshot 2023-09-11 at 12 06 49](https://github.com/apache/kafka/assets/71267/e6c2d8f0-203b-4237-a67d-48516ff66d94)
   
   ![Screenshot 2023-09-11 at 12 08 02](https://github.com/apache/kafka/assets/71267/dad93ace-cf99-4915-b770-637acdbbef21)
   
   [1] https://ge.apache.org/scans/tests?search.relativeStartTime=P28D&search.rootProjectNames=kafka&search.timeZoneId=Europe/Berlin&tests.container=kafka.api.BaseAsyncConsumerTest&tests.test=testCommitSync()


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1308113122


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -27,26 +31,21 @@ class RequestState {
     private int numAttempts = 0;
     private long backoffMs = 0;
 
-    public RequestState(long retryBackoffMs) {
-        this.exponentialBackoff = new ExponentialBackoff(
-            retryBackoffMs,
-            RETRY_BACKOFF_EXP_BASE,
-            retryBackoffMs,
-            RETRY_BACKOFF_JITTER
-        );
+    public RequestState(final LogContext logContext, final long retryBackoffMs) {

Review Comment:
   Author’s note: added a `LogContext` argument and formatting.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CompletedFetch.java:
##########


Review Comment:
   Author’s note: mostly encapsulating the instance variables for protection against accidental outside changes. 



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkClient.java:
##########


Review Comment:
   Author’s note: As stated previously, the core logic from `isUnavailable` and `maybeThrowAuthFailure` were moved to `NetworkClientUtils` for reuse.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########


Review Comment:
   Author’s note: renamed `subscriptionState` to `subscriptions` for consistency with the rest of the newly refactored code base.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1308117834


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########


Review Comment:
   Author’s note: renamed `subscriptionState` to `subscriptions` for consistency with the rest of the newly refactored code base.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on PR #14305:
URL: https://github.com/apache/kafka/pull/14305#issuecomment-1697999668

   cc @lianetm @philipnee 


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1310975600


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -66,13 +65,19 @@ public boolean canSendRequest(final long currentTimeMs) {
             return true;
         }
 
-        if (this.lastReceivedMs == -1 ||
-                this.lastReceivedMs < this.lastSentMs) {
-            // there is an inflight request
+        if (this.lastReceivedMs == -1 || this.lastReceivedMs < this.lastSentMs) {
+            log.debug("An inflight request already exists; lastReceivedMs: {}, lastSentMs:  {}", lastReceivedMs, lastSentMs);

Review Comment:
   I added a relevant `toString()` method to the `RequestState` sub-classes that includes details about the request. The logging now includes the `toString()`-ed `RequestState` for context.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on PR #14305:
URL: https://github.com/apache/kafka/pull/14305#issuecomment-1703327044

   @junrao let me know your thoughts on this PR. Thanks!


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] junrao commented on a diff in pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "junrao (via GitHub)" <gi...@apache.org>.
junrao commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1316404620


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -363,6 +365,20 @@ private CompletableFuture<Map<TopicPartition, OffsetAndMetadata>> chainFuture(fi
                 }
             });
         }
+
+        @Override
+        public String toString() {
+            return "OffsetFetchRequestState{" +
+                    "requestedPartitions=" + requestedPartitions +
+                    ", requestedGeneration=" + requestedGeneration +
+                    ", future=" + future +
+                    ", exponentialBackoff=" + exponentialBackoff +
+                    ", lastSentMs=" + lastSentMs +
+                    ", lastReceivedMs=" + lastReceivedMs +
+                    ", numAttempts=" + numAttempts +
+                    ", backoffMs=" + backoffMs +

Review Comment:
   Yes, I was referring to the `toString` method. It seems that every subclass of `RequestState` directly gets every field in `RequestState` to build its own string. This creates duplicated code and can be a bit error prone.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue closed pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue closed pull request #14305: KAFKA-14274 #1: basic refactoring
URL: https://github.com/apache/kafka/pull/14305


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1308109624


##########
clients/src/main/java/org/apache/kafka/clients/NetworkClientUtils.java:
##########


Review Comment:
   Reviewer’s note: The two new methods in this file were moved here from `ConsumerNetworkClient` as they will be used in other classes in future commits.



##########
clients/src/main/java/org/apache/kafka/clients/NetworkClientUtils.java:
##########


Review Comment:
   Reviewer’s note: The two new methods in this file were moved here from `ConsumerNetworkClient` as they will be used in other classes in future commits.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1308117301


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractFetch.java:
##########


Review Comment:
   Author’s note: most of these changes are related to the encapsulation changes that were made in `CompletedFetch`.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/FetchUtils.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.clients.consumer.internals;
+
+import org.apache.kafka.common.TopicPartition;
+
+public class FetchUtils {

Review Comment:
   This needs a class-level comment and/or some explanation/justification for its existence.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1308113100


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -27,26 +31,21 @@ class RequestState {
     private int numAttempts = 0;
     private long backoffMs = 0;
 
-    public RequestState(long retryBackoffMs) {
-        this.exponentialBackoff = new ExponentialBackoff(
-            retryBackoffMs,
-            RETRY_BACKOFF_EXP_BASE,
-            retryBackoffMs,
-            RETRY_BACKOFF_JITTER
-        );
+    public RequestState(final LogContext logContext, final long retryBackoffMs) {
+        this(logContext, retryBackoffMs, RETRY_BACKOFF_EXP_BASE, retryBackoffMs, RETRY_BACKOFF_JITTER);
     }
 
     // Visible for testing
-    RequestState(final long retryBackoffMs,

Review Comment:
   Author’s note: added a `LogContext` argument and formatting.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -27,26 +31,21 @@ class RequestState {
     private int numAttempts = 0;
     private long backoffMs = 0;
 
-    public RequestState(long retryBackoffMs) {
-        this.exponentialBackoff = new ExponentialBackoff(
-            retryBackoffMs,
-            RETRY_BACKOFF_EXP_BASE,
-            retryBackoffMs,
-            RETRY_BACKOFF_JITTER
-        );
+    public RequestState(final LogContext logContext, final long retryBackoffMs) {

Review Comment:
   Author’s note: added a `LogContext` argument and formatting.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -27,26 +31,21 @@ class RequestState {
     private int numAttempts = 0;
     private long backoffMs = 0;
 
-    public RequestState(long retryBackoffMs) {
-        this.exponentialBackoff = new ExponentialBackoff(
-            retryBackoffMs,
-            RETRY_BACKOFF_EXP_BASE,
-            retryBackoffMs,
-            RETRY_BACKOFF_JITTER
-        );
+    public RequestState(final LogContext logContext, final long retryBackoffMs) {
+        this(logContext, retryBackoffMs, RETRY_BACKOFF_EXP_BASE, retryBackoffMs, RETRY_BACKOFF_JITTER);
     }
 
     // Visible for testing
-    RequestState(final long retryBackoffMs,

Review Comment:
   Author’s note: added a `LogContext` argument and formatting.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1310609016


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -66,13 +65,19 @@ public boolean canSendRequest(final long currentTimeMs) {
             return true;
         }
 
-        if (this.lastReceivedMs == -1 ||
-                this.lastReceivedMs < this.lastSentMs) {
-            // there is an inflight request
+        if (this.lastReceivedMs == -1 || this.lastReceivedMs < this.lastSentMs) {
+            log.debug("An inflight request already exists; lastReceivedMs: {}, lastSentMs:  {}", lastReceivedMs, lastSentMs);

Review Comment:
   Hi @philipnee!
   
   That's a good point. This debug logging doesn't have context of the request.
   
   The request manager calls `canSendRequest()` before creating the request, though. So in the cases where we return `false`, there won't be a request, so there isn't any additional request information that the request manager would be able to log.
   
   Additionally, there are two different reasons why a request cannot be sent:
   
   1. There's already an inflight request
   2. The backoff hasn't expired
   
   When `canSendRequest()` returns `false` back to the request manager, we'd lose the context to explain the reason why the request can't be sent.
   
   I'll look into this a bit more to see what I can do.
   
   Thanks!



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1308112596


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -66,13 +65,19 @@ public boolean canSendRequest(final long currentTimeMs) {
             return true;
         }
 
-        if (this.lastReceivedMs == -1 ||
-                this.lastReceivedMs < this.lastSentMs) {
-            // there is an inflight request
+        if (this.lastReceivedMs == -1 || this.lastReceivedMs < this.lastSentMs) {
+            log.debug("An inflight request already exists; lastReceivedMs: {}, lastSentMs:  {}", lastReceivedMs, lastSentMs);
             return false;
         }
 
-        return requestBackoffExpired(currentTimeMs);
+        long remainingBackoffMs = remainingBackoffMs(currentTimeMs);

Review Comment:
   Author’s note: this is the logic from the now-removed `requestBackoffExpired` method with a log line for debugging.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -106,12 +111,19 @@ public void onFailedAttempt(final long currentTimeMs) {
         this.numAttempts++;
     }
 
-    private boolean requestBackoffExpired(final long currentTimeMs) {

Review Comment:
   Author’s note: `requestBackoffExpired` is now inline in `canSendRequest` above. 



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -106,12 +111,19 @@ public void onFailedAttempt(final long currentTimeMs) {
         this.numAttempts++;
     }
 
-    private boolean requestBackoffExpired(final long currentTimeMs) {

Review Comment:
   Author’s note: `requestBackoffExpired` is now inline in `canSendRequest` above. 



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -66,13 +65,19 @@ public boolean canSendRequest(final long currentTimeMs) {
             return true;
         }
 
-        if (this.lastReceivedMs == -1 ||
-                this.lastReceivedMs < this.lastSentMs) {
-            // there is an inflight request
+        if (this.lastReceivedMs == -1 || this.lastReceivedMs < this.lastSentMs) {
+            log.debug("An inflight request already exists; lastReceivedMs: {}, lastSentMs:  {}", lastReceivedMs, lastSentMs);
             return false;
         }
 
-        return requestBackoffExpired(currentTimeMs);
+        long remainingBackoffMs = remainingBackoffMs(currentTimeMs);

Review Comment:
   Author’s note: this is the logic from the now-removed `requestBackoffExpired` method with a log line for debugging.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] junrao commented on a diff in pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "junrao (via GitHub)" <gi...@apache.org>.
junrao commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1316250831


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -363,6 +365,20 @@ private CompletableFuture<Map<TopicPartition, OffsetAndMetadata>> chainFuture(fi
                 }
             });
         }
+
+        @Override
+        public String toString() {
+            return "OffsetFetchRequestState{" +
+                    "requestedPartitions=" + requestedPartitions +
+                    ", requestedGeneration=" + requestedGeneration +
+                    ", future=" + future +
+                    ", exponentialBackoff=" + exponentialBackoff +
+                    ", lastSentMs=" + lastSentMs +
+                    ", lastReceivedMs=" + lastReceivedMs +
+                    ", numAttempts=" + numAttempts +
+                    ", backoffMs=" + backoffMs +

Review Comment:
   Instead of duplicating the code in RequestState, could we pull out the common part as a util and reuse?



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1316367141


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -363,6 +365,20 @@ private CompletableFuture<Map<TopicPartition, OffsetAndMetadata>> chainFuture(fi
                 }
             });
         }
+
+        @Override
+        public String toString() {
+            return "OffsetFetchRequestState{" +
+                    "requestedPartitions=" + requestedPartitions +
+                    ", requestedGeneration=" + requestedGeneration +
+                    ", future=" + future +
+                    ", exponentialBackoff=" + exponentialBackoff +
+                    ", lastSentMs=" + lastSentMs +
+                    ", lastReceivedMs=" + lastReceivedMs +
+                    ", numAttempts=" + numAttempts +
+                    ", backoffMs=" + backoffMs +

Review Comment:
   I can make an internal `toStringBase()` to `RequestState` that has the core instance variables concatenated as a string. And then subclasses can first append their own instance variable string and then append the result of `toStringBase()` or something. Does that make sense?



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1316485878


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -363,6 +365,20 @@ private CompletableFuture<Map<TopicPartition, OffsetAndMetadata>> chainFuture(fi
                 }
             });
         }
+
+        @Override
+        public String toString() {
+            return "OffsetFetchRequestState{" +
+                    "requestedPartitions=" + requestedPartitions +
+                    ", requestedGeneration=" + requestedGeneration +
+                    ", future=" + future +
+                    ", exponentialBackoff=" + exponentialBackoff +
+                    ", lastSentMs=" + lastSentMs +
+                    ", lastReceivedMs=" + lastReceivedMs +
+                    ", numAttempts=" + numAttempts +
+                    ", backoffMs=" + backoffMs +

Review Comment:
   @junrao I created `toStringBase()` in `RequestState`:
   
   ```java
   /**
    * This method appends the instance variables together in a simple String of comma-separated key value pairs.
    * This allows subclasses to include these values and not have to duplicate each variable, helping to prevent
    * any variables from being omitted when new ones are added.
    *
    * @return String version of instance variables.
    */
   protected String toStringBase() {
       return "owner='" + owner + '\'' +
               ", exponentialBackoff=" + exponentialBackoff +
               ", lastSentMs=" + lastSentMs +
               ", lastReceivedMs=" + lastReceivedMs +
               ", numAttempts=" + numAttempts +
               ", backoffMs=" + backoffMs;
   }
   
   @Override
   public String toString() {
       return "RequestState{" + toStringBase() + '}';
   }
   ```
   
   Subclasses look like this:
   
   ```java
   @Override
   public String toString() {
       return "OffsetFetchRequestState{" +
               "requestedPartitions=" + requestedPartitions +
               ", requestedGeneration=" + requestedGeneration +
               ", future=" + future +
               ", " + toStringBase() +
               '}';
   }
   ```
   
   Does that seem OK?



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] junrao merged pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "junrao (via GitHub)" <gi...@apache.org>.
junrao merged PR #14305:
URL: https://github.com/apache/kafka/pull/14305


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1319162018


##########
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java:
##########
@@ -639,9 +639,9 @@ private void maybeOverrideClientId(Map<String, Object> configs) {
         }
     }
 
-    protected static Map<String, Object> appendDeserializerToConfig(Map<String, Object> configs,
-                                                                    Deserializer<?> keyDeserializer,
-                                                                    Deserializer<?> valueDeserializer) {
+    public static Map<String, Object> appendDeserializerToConfig(Map<String, Object> configs,

Review Comment:
   Yes.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1308116494


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CompletedFetch.java:
##########


Review Comment:
   Author’s note: mostly encapsulating the instance variables for protection against accidental outside changes. 



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkClient.java:
##########


Review Comment:
   Author’s note: As stated previously, the core logic from `isUnavailable` and `maybeThrowAuthFailure` were moved to `NetworkClientUtils` for reuse.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractFetch.java:
##########
@@ -783,9 +785,4 @@ public void close(final Timer timer) {
     public void close() {
         close(time.timer(0));
     }
-
-    private void requestMetadataUpdate(final TopicPartition topicPartition) {

Review Comment:
   Author’s note: `requestMetadataUpdate` was moved to `FetchUtils` as it will be reused elsewhere in future commits.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractFetch.java:
##########
@@ -783,9 +785,4 @@ public void close(final Timer timer) {
     public void close() {
         close(time.timer(0));
     }
-
-    private void requestMetadataUpdate(final TopicPartition topicPartition) {

Review Comment:
   Author’s note: `requestMetadataUpdate` was moved to `FetchUtils` as it will be reused elsewhere in future commits.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractFetch.java:
##########


Review Comment:
   Author’s note: most of these changes are related to the encapsulation changes that were made in `CompletedFetch`.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] kirktrue commented on a diff in pull request #14305: KAFKA-14274 #1: basic refactoring

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1308111377


##########
clients/src/main/java/org/apache/kafka/common/utils/ExponentialBackoff.java:
##########


Review Comment:
   Author’s note: adding `toString()` implementations is helpful in debugging.



##########
clients/src/main/java/org/apache/kafka/common/utils/ExponentialBackoff.java:
##########


Review Comment:
   Author’s note: adding `toString()` implementations is helpful in debugging.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -106,12 +111,19 @@ public void onFailedAttempt(final long currentTimeMs) {
         this.numAttempts++;
     }
 
-    private boolean requestBackoffExpired(final long currentTimeMs) {
-        return remainingBackoffMs(currentTimeMs) <= 0;
-    }
-
     long remainingBackoffMs(final long currentTimeMs) {
         long timeSinceLastReceiveMs = currentTimeMs - this.lastReceivedMs;
         return Math.max(0, backoffMs - timeSinceLastReceiveMs);
     }
-}
+
+    @Override
+    public String toString() {

Review Comment:
   Author’s note: adding `toString()` implementations is helpful in debugging.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -106,12 +111,19 @@ public void onFailedAttempt(final long currentTimeMs) {
         this.numAttempts++;
     }
 
-    private boolean requestBackoffExpired(final long currentTimeMs) {
-        return remainingBackoffMs(currentTimeMs) <= 0;
-    }
-
     long remainingBackoffMs(final long currentTimeMs) {
         long timeSinceLastReceiveMs = currentTimeMs - this.lastReceivedMs;
         return Math.max(0, backoffMs - timeSinceLastReceiveMs);
     }
-}
+
+    @Override
+    public String toString() {

Review Comment:
   Author’s note: adding `toString()` implementations is helpful in debugging.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] philipnee commented on a diff in pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "philipnee (via GitHub)" <gi...@apache.org>.
philipnee commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1309342900


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -66,13 +65,19 @@ public boolean canSendRequest(final long currentTimeMs) {
             return true;
         }
 
-        if (this.lastReceivedMs == -1 ||
-                this.lastReceivedMs < this.lastSentMs) {
-            // there is an inflight request
+        if (this.lastReceivedMs == -1 || this.lastReceivedMs < this.lastSentMs) {
+            log.debug("An inflight request already exists; lastReceivedMs: {}, lastSentMs:  {}", lastReceivedMs, lastSentMs);

Review Comment:
   i actually wonder if the debug would be useful due to lack of the information of what request it is.  maybe this log should stay at the request manager level?



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] philipnee commented on pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "philipnee (via GitHub)" <gi...@apache.org>.
philipnee commented on PR #14305:
URL: https://github.com/apache/kafka/pull/14305#issuecomment-1714066658

   @divijvaidya - thanks for reporting that.


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] philipnee commented on pull request #14305: KAFKA-14274: [1/7] basic refactoring

Posted by "philipnee (via GitHub)" <gi...@apache.org>.
philipnee commented on PR #14305:
URL: https://github.com/apache/kafka/pull/14305#issuecomment-1714085023

   @divijvaidya - I was trying to cherry pick some additional changes into trunk however, i actually don't find it flaky - I think these two should be failing constantly (causing by completing the wrong CompletableFuture). It's strange that this doesn't fail all the time...


-- 
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: jira-unsubscribe@kafka.apache.org

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