jeqo commented on code in PR #13561: URL: https://github.com/apache/kafka/pull/13561#discussion_r1294618085
########## core/src/main/java/kafka/log/remote/RemoteLogManager.java: ########## @@ -1033,6 +1360,35 @@ public void close() { } } + private static class RetentionSizeData { + private final long retentionSize; + private final long remainingBreachedSize; + + public RetentionSizeData(long retentionSize, long remainingBreachedSize) { + if (retentionSize < remainingBreachedSize) { + throw new IllegalArgumentException("retentionSize must be greater than remainingBreachedSize"); + } Review Comment: Could we elaborate what's the purpose of this validation? IIUC `(totalSize - retentionSize) > retentionSize`, are we validating that totalSize is not higher than 2 times `retentionSize`? -- 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