This is an automated email from the ASF dual-hosted git repository.

lupeng pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 38306f781ad HBASE-29586 Setting hbase.oldwals.cleaner.thread.size to 
negative value will throw IllegalArgumentException (#7293)
38306f781ad is described below

commit 38306f781ad69fea5af73fe816cb0554a429ad90
Author: wangxiangdong123 <[email protected]>
AuthorDate: Thu Dec 18 21:29:20 2025 +0800

    HBASE-29586 Setting hbase.oldwals.cleaner.thread.size to negative value 
will throw IllegalArgumentException (#7293)
    
    Signed-off-by: Duo Zhang <[email protected]>
    Signed-off-by: Nihal Jain <[email protected]>
    Signed-off-by: Peng Lu <[email protected]>
---
 .../java/org/apache/hadoop/hbase/master/cleaner/LogCleaner.java    | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/LogCleaner.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/LogCleaner.java
index 6ede2b50d8a..2b676e3ba9d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/LogCleaner.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/LogCleaner.java
@@ -100,6 +100,13 @@ public class LogCleaner extends 
CleanerChore<BaseLogCleanerDelegate>
   @Override
   public void onConfigurationChange(Configuration conf) {
     int newSize = conf.getInt(OLD_WALS_CLEANER_THREAD_SIZE, 
DEFAULT_OLD_WALS_CLEANER_THREAD_SIZE);
+    if (newSize <= 0) {
+      LOG.debug(
+        "The configuration {} has been set to an invalid value {}, "
+          + "the previous value {} will be used, no need to update.",
+        OLD_WALS_CLEANER_THREAD_SIZE, newSize, oldWALsCleaner.size());
+      return;
+    }
     if (newSize == oldWALsCleaner.size()) {
       LOG.debug(
         "Size from configuration is the same as previous which " + "is {}, no 
need to update.",

Reply via email to