You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "divijvaidya (via GitHub)" <gi...@apache.org> on 2023/07/21 09:25:23 UTC

[GitHub] [kafka] divijvaidya commented on a diff in pull request #14049: KAFKA-14038: Optimise calculation of size for log in remote tier

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


##########
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:
   Please add a comment here explaining that this is a naive implementation and if required, could be improved in future. I know that you mentioned it in the description of the ticket but the code reader perhaps should also know why a decision was made and what can be done here.



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

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