clolov commented on code in PR #14049:
URL: https://github.com/apache/kafka/pull/14049#discussion_r1276036551


##########
storage/src/main/java/org/apache/kafka/server/log/remote/metadata/storage/TopicBasedRemoteLogMetadataManager.java:
##########
@@ -327,6 +327,17 @@ public void onStopPartitions(Set<TopicIdPartition> 
partitions) {
         }
     }
 
+    @Override
+    public Long remoteLogSize(TopicIdPartition topicPartition, int 
leaderEpoch) throws RemoteStorageException {
+        long remoteLogSize = 0L;
+        Iterator<RemoteLogSegmentMetadata> remoteLogSegmentMetadataIterator = 
remotePartitionMetadataStore.listRemoteLogSegments(topicPartition, leaderEpoch);

Review Comment:
   Is this remedied now for you @showuon? The comment is
   ```
   // This is a simple-to-understand but not the most optimal solution.
   // The TopicBasedRemoteLogMetadataManager's remote metadata store is 
file-based. During design discussions
   // at https://lists.apache.org/thread/kxd6fffq02thbpd0p5y4mfbs062g7jr6
   // we reached a consensus that sequential iteration over files on the local 
file system is performant enough.
   // Should this stop being the case, the remote log size could be calculated 
by incrementing/decrementing
   // counters during API calls for a more performant implementation.
   ```



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