jiafu1115 commented on code in PR #20913:
URL: https://github.com/apache/kafka/pull/20913#discussion_r3294903000
##########
core/src/test/scala/unit/kafka/server/DynamicBrokerConfigTest.scala:
##########
@@ -770,6 +770,55 @@ class DynamicBrokerConfigTest {
verifyIncorrectLogLocalRetentionProps(2000L, 1000L, -1, 100)
}
+ @Test
+ def testDynamicRemoteCopyLagThrowsOnIncorrectConfig(): Unit = {
+ // remote copy lag ms cannot exceed effective local retention ms
+ verifyIncorrectRemoteCopyLagProps(
+ retentionMs = 1000L,
+ logLocalRetentionMs = -2L,
+ remoteCopyLagMs = 1001L,
+ retentionBytes = 1000L,
+ logLocalRetentionBytes = -2L,
+ remoteCopyLagBytes = 100L
+ )
+
+ // remote copy lag bytes cannot exceed effective local retention bytes
+ verifyIncorrectRemoteCopyLagProps(
+ retentionMs = 1000L,
+ logLocalRetentionMs = -2L,
+ remoteCopyLagMs = 100L,
+ retentionBytes = 1000L,
+ logLocalRetentionBytes = -2L,
+ remoteCopyLagBytes = 1001L
+ )
+
+ }
+
+ def verifyIncorrectRemoteCopyLagProps(retentionMs: Long,
+ logLocalRetentionMs: Long,
+ remoteCopyLagMs: Long,
Review Comment:
already merged. so solve it.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]