vvcephei commented on a change in pull request #8896:
URL: https://github.com/apache/kafka/pull/8896#discussion_r443001442



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StoreChangelogReader.java
##########
@@ -458,9 +462,48 @@ public void restore() {
             }
 
             maybeUpdateLimitOffsetsForStandbyChangelogs();
+
+            maybeLogRestorationProgress();
+        }
+    }
+
+    private void maybeLogRestorationProgress() {
+        if (state == ChangelogReaderState.ACTIVE_RESTORING) {
+            if (time.milliseconds() - lastRestoreLogTime > 
RESTORE_LOG_INTERVAL_MS) {
+                final Set<TopicPartition> topicPartitions = 
activeRestoringChangelogs();
+                if (!topicPartitions.isEmpty()) {
+                    final StringBuilder builder = new 
StringBuilder().append("Restoration in progress for ")
+                                                                     
.append(topicPartitions.size())
+                                                                     .append(" 
partitions.");
+                    for (final TopicPartition partition : topicPartitions) {

Review comment:
       I thought about it; while it does make the logs easier to read, it makes 
them harder to search (as in `grep`, since the line that would match the query 
doesn't contain all the information.
   
   We do have other places where we concatenate every topic-partition on a 
single line, eg in the StreamsPartitionAssignor, so I think if long lines were 
a problem, people would already be complaining.




----------------------------------------------------------------
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:
[email protected]


Reply via email to