kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject [kafka] branch trunk updated: MINOR: LogCleaner.validateReconfiguration fixes (#4770)
Date Wed, 28 Mar 2018 04:03:39 GMT
This is an automated email from the ASF dual-hosted git repository.

ijuma pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 281dbfd  MINOR: LogCleaner.validateReconfiguration fixes (#4770)
281dbfd is described below

commit 281dbfd9813603d913a2a0b948547dea7b863be2
Author: Ismael Juma <ismael@juma.me.uk>
AuthorDate: Tue Mar 27 21:03:35 2018 -0700

    MINOR: LogCleaner.validateReconfiguration fixes (#4770)
    
    Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
---
 core/src/main/scala/kafka/log/LogCleaner.scala | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/core/src/main/scala/kafka/log/LogCleaner.scala b/core/src/main/scala/kafka/log/LogCleaner.scala
index 0ee9942..0dd63b3 100644
--- a/core/src/main/scala/kafka/log/LogCleaner.scala
+++ b/core/src/main/scala/kafka/log/LogCleaner.scala
@@ -161,9 +161,8 @@ class LogCleaner(initialConfig: CleanerConfig,
   override def validateReconfiguration(newConfig: KafkaConfig): Unit = {
     val newCleanerConfig = LogCleaner.cleanerConfig(newConfig)
     val numThreads = newCleanerConfig.numThreads
-    numThreads >= 1 && numThreads >= config.numThreads / 2 && numThreads
<= config.numThreads * 2
     val currentThreads = config.numThreads
-    if (numThreads <= 0)
+    if (numThreads < 1)
       throw new ConfigException(s"Log cleaner threads should be at least 1")
     if (numThreads < currentThreads / 2)
       throw new ConfigException(s"Log cleaner threads cannot be reduced to less than half
the current value $currentThreads")

-- 
To stop receiving notification emails like this one, please contact
ijuma@apache.org.

Mime
View raw message