From 9831fd37fd32da71938d0da7b145c8c9cb601a6e Mon Sep 17 00:00:00 2001 From: Jian Date: Fri, 22 May 2026 19:36:41 +0800 Subject: [PATCH 1/2] MINOR: Correct the variable name in remote storage's test Signed-off-by: Jian --- .../kafka/server/DynamicBrokerConfigTest.scala | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/src/test/scala/unit/kafka/server/DynamicBrokerConfigTest.scala b/core/src/test/scala/unit/kafka/server/DynamicBrokerConfigTest.scala index 581af6827933e..6a9367418cef0 100755 --- a/core/src/test/scala/unit/kafka/server/DynamicBrokerConfigTest.scala +++ b/core/src/test/scala/unit/kafka/server/DynamicBrokerConfigTest.scala @@ -776,30 +776,30 @@ class DynamicBrokerConfigTest { verifyIncorrectRemoteCopyLagProps( retentionMs = 1000L, logLocalRetentionMs = -2L, - remoteCopyLagMs = 1001L, + logRemoteCopyLagMs = 1001L, retentionBytes = 1000L, logLocalRetentionBytes = -2L, - remoteCopyLagBytes = 100L + logRemoteCopyLagBytes = 100L ) // remote copy lag bytes cannot exceed effective local retention bytes verifyIncorrectRemoteCopyLagProps( retentionMs = 1000L, logLocalRetentionMs = -2L, - remoteCopyLagMs = 100L, + logRemoteCopyLagMs = 100L, retentionBytes = 1000L, logLocalRetentionBytes = -2L, - remoteCopyLagBytes = 1001L + logRemoteCopyLagBytes = 1001L ) } def verifyIncorrectRemoteCopyLagProps(retentionMs: Long, logLocalRetentionMs: Long, - remoteCopyLagMs: Long, + logRemoteCopyLagMs: Long, retentionBytes: Long, logLocalRetentionBytes: Long, - remoteCopyLagBytes: Long): Unit = { + logRemoteCopyLagBytes: Long): Unit = { val props = TestUtils.createBrokerConfig(0, port = 8181) props.put(ServerLogConfigs.LOG_RETENTION_TIME_MILLIS_CONFIG, retentionMs.toString) props.put(ServerLogConfigs.LOG_RETENTION_BYTES_CONFIG, retentionBytes.toString) @@ -810,9 +810,9 @@ class DynamicBrokerConfigTest { val newProps = new Properties() newProps.put(RemoteLogManagerConfig.LOG_LOCAL_RETENTION_MS_PROP, logLocalRetentionMs.toString) - newProps.put(RemoteLogManagerConfig.LOG_REMOTE_COPY_LAG_MS_PROP, remoteCopyLagMs.toString) + newProps.put(RemoteLogManagerConfig.LOG_REMOTE_COPY_LAG_MS_PROP, logRemoteCopyLagMs.toString) newProps.put(RemoteLogManagerConfig.LOG_LOCAL_RETENTION_BYTES_PROP, logLocalRetentionBytes.toString) - newProps.put(RemoteLogManagerConfig.LOG_REMOTE_COPY_LAG_BYTES_PROP, remoteCopyLagBytes.toString) + newProps.put(RemoteLogManagerConfig.LOG_REMOTE_COPY_LAG_BYTES_PROP, logRemoteCopyLagBytes.toString) // validate default config assertThrows(classOf[ConfigException], () => config.dynamicConfig.validate(newProps, perBrokerConfig = false)) // validate per broker config From 3941e52e8bb8fb18e7c9650dea62c188446a8ab9 Mon Sep 17 00:00:00 2001 From: Jian Date: Fri, 22 May 2026 22:00:53 +0800 Subject: [PATCH 2/2] correct more similar issue Signed-off-by: Jian --- .../server/DynamicBrokerConfigTest.scala | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/core/src/test/scala/unit/kafka/server/DynamicBrokerConfigTest.scala b/core/src/test/scala/unit/kafka/server/DynamicBrokerConfigTest.scala index 6a9367418cef0..a451847994e9e 100755 --- a/core/src/test/scala/unit/kafka/server/DynamicBrokerConfigTest.scala +++ b/core/src/test/scala/unit/kafka/server/DynamicBrokerConfigTest.scala @@ -771,9 +771,9 @@ class DynamicBrokerConfigTest { } @Test - def testDynamicRemoteCopyLagThrowsOnIncorrectConfig(): Unit = { - // remote copy lag ms cannot exceed effective local retention ms - verifyIncorrectRemoteCopyLagProps( + def testDynamicLogRemoteCopyLagThrowsOnIncorrectConfig(): Unit = { + // log remote copy lag ms cannot exceed effective log local retention ms + verifyIncorrectLogRemoteCopyLagProps( retentionMs = 1000L, logLocalRetentionMs = -2L, logRemoteCopyLagMs = 1001L, @@ -782,8 +782,8 @@ class DynamicBrokerConfigTest { logRemoteCopyLagBytes = 100L ) - // remote copy lag bytes cannot exceed effective local retention bytes - verifyIncorrectRemoteCopyLagProps( + // log remote copy lag bytes cannot exceed effective log local retention bytes + verifyIncorrectLogRemoteCopyLagProps( retentionMs = 1000L, logLocalRetentionMs = -2L, logRemoteCopyLagMs = 100L, @@ -794,12 +794,12 @@ class DynamicBrokerConfigTest { } - def verifyIncorrectRemoteCopyLagProps(retentionMs: Long, - logLocalRetentionMs: Long, - logRemoteCopyLagMs: Long, - retentionBytes: Long, - logLocalRetentionBytes: Long, - logRemoteCopyLagBytes: Long): Unit = { + def verifyIncorrectLogRemoteCopyLagProps(retentionMs: Long, + logLocalRetentionMs: Long, + logRemoteCopyLagMs: Long, + retentionBytes: Long, + logLocalRetentionBytes: Long, + logRemoteCopyLagBytes: Long): Unit = { val props = TestUtils.createBrokerConfig(0, port = 8181) props.put(ServerLogConfigs.LOG_RETENTION_TIME_MILLIS_CONFIG, retentionMs.toString) props.put(ServerLogConfigs.LOG_RETENTION_BYTES_CONFIG, retentionBytes.toString)