You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/05/07 16:41:33 UTC

[GitHub] [kafka] hachikuji commented on a change in pull request #8629: MINOR: Log4j Improvements on Fetcher

hachikuji commented on a change in pull request #8629:
URL: https://github.com/apache/kafka/pull/8629#discussion_r421619393



##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java
##########
@@ -260,7 +260,7 @@ public synchronized int sendFetches() {
             }
             RequestFuture<ClientResponse> future = client.send(fetchTarget, request);
             // We add the node to the set of nodes with pending fetch requests before adding the
-            // listener because the future may have been fulfilled on another thread (e.g. during a
+            // listenerbecause the future may have been fulfilled on another thread (e.g. during a

Review comment:
       I assume this was unintentional.

##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java
##########
@@ -676,13 +676,15 @@ private ListOffsetResult fetchOffsetsByTimes(Map<TopicPartition, Long> timestamp
             if (completedFetch.nextFetchOffset == position.offset) {
                 List<ConsumerRecord<K, V>> partRecords = completedFetch.fetchRecords(maxRecords);
 
+                log.trace("Returning fetched records {} at offset {} for assigned partition {}",
+                        partRecords, position, completedFetch.partition);

Review comment:
       I feel logging all of the records even at TRACE level will be too much. For example, our system tests often have TRACE enabled. Huge single-line log messages are difficult to consume both visually and in systems like elastic.




----------------------------------------------------------------
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.

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