jeqo commented on code in PR #13561: URL: https://github.com/apache/kafka/pull/13561#discussion_r1294829317
########## core/src/main/java/kafka/log/remote/RemoteLogManager.java: ########## @@ -1033,6 +1365,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"); + } + + this.retentionSize = retentionSize; + this.remainingBreachedSize = remainingBreachedSize; + } + } + + private static class RetentionTimeData { + + private final long retentionMs; + private final long cleanupUntilMs; + + public RetentionTimeData(long retentionMs, long cleanupUntilMs) { + if (retentionMs < cleanupUntilMs) { + throw new IllegalArgumentException("retentionMs must be greater than cleanupUntilMs"); Review Comment: ```suggestion throw new IllegalArgumentException("retentionMs [" + retentionMs + "] must be greater than cleanupUntilMs [" + cleanupUntilMs + "]"); ``` ########## core/src/main/java/kafka/log/remote/RemoteLogManager.java: ########## @@ -1033,6 +1365,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: ```suggestion throw new IllegalArgumentException("retentionSize [" + retentionSize + "] must be greater than remainingBreachedSize [" + remainingBreachedSize + "]"); ``` -- 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