You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "guluo (Jira)" <ji...@apache.org> on 2025/12/19 06:34:00 UTC
[jira] [Reopened] (HBASE-29586) Setting `hbase.oldwals.cleaner.thread.size` to negative value will throw IllegalArgumentException
[ https://issues.apache.org/jira/browse/HBASE-29586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
guluo reopened HBASE-29586:
---------------------------
> Setting `hbase.oldwals.cleaner.thread.size` to negative value will throw IllegalArgumentException
> -------------------------------------------------------------------------------------------------
>
> Key: HBASE-29586
> URL: https://issues.apache.org/jira/browse/HBASE-29586
> Project: HBase
> Issue Type: Bug
> Reporter: wangxiangdong
> Assignee: wangxiangdong
> Priority: Minor
> Labels: pull-request-available
> Fix For: 3.0.0-beta-2
>
>
> [problem]
> HBase Master will be initialized with the following setting:
> <property>
> <name>hbase.oldwals.cleaner.thread.size</name>
> <value>-1</value>
> <description>Default is 2</description>
> </property>
> After we read the source code, we found that "hbase.oldwals.cleaner.thread.size" is parsed and used in onConfigurationChange() function without checking:
> {code:java}
> int newSize = conf.getInt(OLD_WALS_CLEANER_THREAD_SIZE, DEFAULT_OLD_WALS_CLEANER_THREAD_SIZE);
> if (newSize == oldWALsCleaner.size()) {
> LOG.debug( "Size from configuration is the same as previous which " + "is {}, no need to update.", newSize); return;
> }
> interruptOldWALsCleaner();
> oldWALsCleaner = createOldWalsCleaner(newSize);{code}
> The value of "hbase.oldwals.cleaner.thread.size" will be served as the initialCapacity of ArrayList. If the configuration value is negative, an IllegalArgumentException will be thrown.:
> {code:java}
> private List<Thread> createOldWalsCleaner(int size) {
> ...
> List<Thread> oldWALsCleaner = new ArrayList<>(size);
> ...
> } {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)