kirktrue commented on code in PR #20965:
URL: https://github.com/apache/kafka/pull/20965#discussion_r2579181541
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/StreamsGroupHeartbeatRequestManager.java:
##########
@@ -486,7 +493,10 @@ private NetworkClientDelegate.UnsentRequest
makeHeartbeatRequestAndLogResponse(f
else
logger.error("StreamsGroupHeartbeatRequest failed because
of {}: {}", error, response);
} else {
- logger.error("StreamsGroupHeartbeatRequest failed because of
unexpected exception.", exception);
+ if (isClosed) {
+ logger.debug("StreamsGroupHeartbeatRequest failed because
of exception during close: ", exception);
+ } else
+ logger.error("StreamsGroupHeartbeatRequest failed because
of unexpected exception: ", exception);
Review Comment:
Same here: both the `if` and the `else` should use brackets _or_ both `if`
and the `else` branches should _not_ use brackets.
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractHeartbeatRequestManager.java:
##########
@@ -315,7 +322,10 @@ private NetworkClientDelegate.UnsentRequest
logResponse(final NetworkClientDeleg
else
logger.error("{} failed because of {}: {}",
heartbeatRequestName(), error, response);
} else {
- logger.error("{} failed because of unexpected exception.",
heartbeatRequestName(), exception);
+ if (isClosed) {
+ logger.debug("{} failed because of exception during close:
{}", heartbeatRequestName(), exception);
+ } else
+ logger.error("{} failed because of unexpected exception:
{}", heartbeatRequestName(), exception);
Review Comment:
Nitpicky, sure, but I think we should be consistent with the use of the
brackets.
--
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]