jsancio commented on code in PR #13540:
URL: https://github.com/apache/kafka/pull/13540#discussion_r1170345743


##########
metadata/src/main/java/org/apache/kafka/controller/ControllerPurgatory.java:
##########
@@ -65,6 +81,7 @@ void failAll(Exception exception) {
         while (iter.hasNext()) {
             Entry<Long, List<DeferredEvent>> entry = iter.next();
             for (DeferredEvent event : entry.getValue()) {
+                log.info("failAll({}): failing {}.", 
exception.getClass().getSimpleName(), event);

Review Comment:
   I see. We don't log the stacktrace because `failAll` is only called with 
`NotControllerException`. Should we change the signature of this method to 
`void failAll(ApiException)`?



##########
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java:
##########
@@ -977,16 +969,8 @@ public void 
handleSnapshot(SnapshotReader<ApiMessageAndVersion> reader) {
                         long offset = batch.lastOffset();
                         List<ApiMessageAndVersion> messages = batch.records();
 
-                        if (log.isDebugEnabled()) {
-                            if (log.isTraceEnabled()) {
-                                log.trace("Replaying snapshot ({}) batch with 
last offset of {}: {}",
-                                    reader.snapshotId(), offset, 
messages.stream().map(ApiMessageAndVersion::toString).
-                                        collect(Collectors.joining(", ")));
-                            } else {
-                                log.debug("Replaying snapshot ({}) batch with 
last offset of {}",
-                                    reader.snapshotId(), offset);
-                            }
-                        }
+                        log.debug("Replaying snapshot {} batch with last 
offset of {}",
+                            reader.snapshotId(), offset);

Review Comment:
   Do you want to use `snapshotName` here to make it consistent with the rest 
of the log messages?



-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to