Copilot commented on code in PR #21219:
URL: https://github.com/apache/kafka/pull/21219#discussion_r2650633389
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerMembershipManager.java:
##########
@@ -478,13 +478,13 @@ public void
consumerRebalanceListenerCallbackCompleted(ConsumerRebalanceListener
Optional<KafkaException> error = event.error();
CompletableFuture<Void> future = event.future();
- if (error.isPresent()) {
- Exception e = error.get();
- log.warn(
- "The {} method completed with an error ({}); signaling to
continue to the next phase of rebalance",
+ if (error.isPresent()) {
Review Comment:
The if statement has incorrect indentation. It should be indented with 8
spaces to align with the rest of the method body, not 12 spaces.
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerMembershipManager.java:
##########
@@ -478,13 +478,13 @@ public void
consumerRebalanceListenerCallbackCompleted(ConsumerRebalanceListener
Optional<KafkaException> error = event.error();
CompletableFuture<Void> future = event.future();
- if (error.isPresent()) {
- Exception e = error.get();
- log.warn(
- "The {} method completed with an error ({}); signaling to
continue to the next phase of rebalance",
+ if (error.isPresent()) {
+ Exception e = error.get();
+ log.warn(
+ "Rebalance step failed in method={}, proceeding to next
phase",
methodName.fullyQualifiedMethodName(),
- e.getMessage()
- );
+ e
+ );
future.completeExceptionally(e);
Review Comment:
The indentation of this line is inconsistent. It appears to have 13 spaces
of indentation when it should have 12 spaces to align with the other statements
in the if block.
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerMembershipManager.java:
##########
@@ -478,13 +478,13 @@ public void
consumerRebalanceListenerCallbackCompleted(ConsumerRebalanceListener
Optional<KafkaException> error = event.error();
CompletableFuture<Void> future = event.future();
- if (error.isPresent()) {
- Exception e = error.get();
- log.warn(
- "The {} method completed with an error ({}); signaling to
continue to the next phase of rebalance",
+ if (error.isPresent()) {
+ Exception e = error.get();
+ log.warn(
+ "Rebalance step failed in method={}, proceeding to next
phase",
Review Comment:
The log message uses a named parameter style 'method={}' which is
inconsistent with the logging style used throughout this file and the codebase.
All other log statements use positional placeholders without names, e.g., 'The
{} method...' (see line 463, 491-492). The log message should follow the same
pattern as the debug statement in the else branch for consistency.
--
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]