guozhangwang commented on a change in pull request #11631:
URL: https://github.com/apache/kafka/pull/11631#discussion_r800245635
##########
File path:
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java
##########
@@ -488,7 +492,7 @@ public boolean poll(Timer timer, boolean waitForJoinGroup) {
// Always update the heartbeat last poll time so that the
heartbeat thread does not leave the
// group proactively due to application inactivity even if (say)
the coordinator cannot be found.
pollHeartbeat(timer.currentTimeMs());
- if (coordinatorUnknown() && !ensureCoordinatorReady(timer)) {
+ if (coordinatorUnknownAndUnready(timer)) {
Review comment:
Makes sense.
##########
File path:
clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java
##########
@@ -2641,14 +2565,16 @@ private FetchResponse fetchResponse(TopicPartition
partition, long fetchOffset,
ConsumerNetworkClient consumerClient = new
ConsumerNetworkClient(loggerFactory, client, metadata, time,
retryBackoffMs, requestTimeoutMs, heartbeatIntervalMs);
- GroupRebalanceConfig rebalanceConfig = new
GroupRebalanceConfig(sessionTimeoutMs,
+ ConsumerCoordinator consumerCoordinator = null;
+ if (groupId != null) {
+ GroupRebalanceConfig rebalanceConfig = new
GroupRebalanceConfig(sessionTimeoutMs,
Review comment:
Nice cleanup!
--
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]