clolov commented on code in PR #14049: URL: https://github.com/apache/kafka/pull/14049#discussion_r1273206652
########## storage/api/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogMetadataManager.java: ########## @@ -201,4 +201,13 @@ void onPartitionLeadershipChanges(Set<TopicIdPartition> leaderPartitions, * @param partitions topic partitions that have been stopped. */ void onStopPartitions(Set<TopicIdPartition> partitions); + + /** + * Returns total size of the log for the given leader epoch in remote storage. + * + * @param topicPartition topic partition for which size needs to be calculated. + * @param leaderEpoch Size will only include segments belonging to this epoch. + * @return Total size of the log stored in remote storage in bytes. + */ + Long remoteLogSize(TopicIdPartition topicPartition, int leaderEpoch) throws RemoteStorageException; Review Comment: Thank you for the reviews! @satishd to be honest this is a miss on my side as I started with the interface specified here https://cwiki.apache.org/confluence/display/KAFKA/KIP-852%3A+Optimize+calculation+of+size+for+log+in+remote+tier#KIP852:Optimizecalculationofsizeforloginremotetier-NewAPIinRemoteLogMetadataManager(RLMM). Looking over it again, in its current implementation the value can never be null as if we cannot calculate the size due to a storage problem we will throw an exception. I will change it in subsequent commits + update the KIP. -- 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