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

zhangduo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 8808e38de87 HBASE-29561 Add a config name for HBASE-29401 (#7259)
8808e38de87 is described below

commit 8808e38de876838d7502ef070622ba8f6b35bc1f
Author: chaijunjie0101 <[email protected]>
AuthorDate: Fri Sep 5 09:17:15 2025 +0800

    HBASE-29561 Add a config name for HBASE-29401 (#7259)
    
    Signed-off-by: Duo Zhang <[email protected]>
---
 .../apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java  |  5 +++--
 .../apache/hadoop/hbase/client/ConnectionConfiguration.java    |  3 +++
 hbase-common/src/main/resources/hbase-default.xml              |  7 +++++++
 src/main/asciidoc/_chapters/hbase-default.adoc                 | 10 ++++++++++
 4 files changed, 23 insertions(+), 2 deletions(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
index 8c23ef181bf..e26fb837b89 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
@@ -25,6 +25,7 @@ import static org.apache.hadoop.hbase.HConstants.ZEROES;
 import static org.apache.hadoop.hbase.TableName.META_TABLE_NAME;
 import static 
org.apache.hadoop.hbase.client.AsyncRegionLocatorHelper.createRegionLocations;
 import static org.apache.hadoop.hbase.client.AsyncRegionLocatorHelper.isGood;
+import static 
org.apache.hadoop.hbase.client.ConnectionConfiguration.HBASE_CLIENT_META_CACHE_INVALIDATE_INTERVAL;
 import static 
org.apache.hadoop.hbase.client.ConnectionUtils.createClosestRowAfter;
 import static org.apache.hadoop.hbase.client.ConnectionUtils.isEmptyStopRow;
 import static org.apache.hadoop.hbase.client.RegionInfo.createRegionName;
@@ -267,8 +268,8 @@ class AsyncNonMetaRegionLocator {
     // Suggest set it to 24h or a higher value, because disable/delete table 
usually not very
     // frequently.
     this.retryTimer = retryTimer;
-    long metaCacheInvalidateInterval = conn.getConfiguration()
-      .getLong("hbase.client.connection.metacache.invalidate-interval.ms", 0L);
+    long metaCacheInvalidateInterval =
+      
conn.getConfiguration().getLong(HBASE_CLIENT_META_CACHE_INVALIDATE_INTERVAL, 
0L);
     if (metaCacheInvalidateInterval > 0) {
       TimerTask invalidateMetaCacheTask = 
getInvalidateMetaCacheTask(metaCacheInvalidateInterval);
       this.retryTimer.newTimeout(invalidateMetaCacheTask, 
metaCacheInvalidateInterval,
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionConfiguration.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionConfiguration.java
index 068f0e459a2..545a85b16c9 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionConfiguration.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionConfiguration.java
@@ -57,6 +57,9 @@ public class ConnectionConfiguration {
   public static final String HBASE_CLIENT_META_SCANNER_TIMEOUT =
     "hbase.client.meta.scanner.timeout.period";
 
+  public static final String HBASE_CLIENT_META_CACHE_INVALIDATE_INTERVAL =
+    "hbase.client.connection.metacache.invalidate-interval.ms";
+
   private final long writeBufferSize;
   private final long writeBufferPeriodicFlushTimeoutMs;
   private final long writeBufferPeriodicFlushTimerTickMs;
diff --git a/hbase-common/src/main/resources/hbase-default.xml 
b/hbase-common/src/main/resources/hbase-default.xml
index ab700587ffa..d015ceb2d45 100644
--- a/hbase-common/src/main/resources/hbase-default.xml
+++ b/hbase-common/src/main/resources/hbase-default.xml
@@ -1129,6 +1129,13 @@ possible configurations would overwhelm and obscure the 
important.
       RetriesExhaustedException. But if the total time being blocking reach 
the operation timeout
       before retries exhausted, it will break early and throw 
SocketTimeoutException.</description>
   </property>
+  <property>
+    <name>hbase.client.connection.metacache.invalidate-interval.ms</name>
+    <value>0</value>
+    <description>Interval in milliseconds of checking and invalidating meta 
cache when table
+      disabled or dropped, when set to zero means disable checking, suggest 
set it to 24h
+      or a higher value, because disable/delete table usually not very 
frequently.</description>
+  </property>
   <property>
     <name>hbase.cells.scanned.per.heartbeat.check</name>
     <value>10000</value>
diff --git a/src/main/asciidoc/_chapters/hbase-default.adoc 
b/src/main/asciidoc/_chapters/hbase-default.adoc
index ccbaaabf694..f1606662af9 100644
--- a/src/main/asciidoc/_chapters/hbase-default.adoc
+++ b/src/main/asciidoc/_chapters/hbase-default.adoc
@@ -724,6 +724,16 @@ Client scanner lease period in milliseconds.
 .Default
 `2`
 
+[[hbase.client.connection.metacache.invalidate-interval.ms]]
+*`hbase.client.connection.metacache.invalidate-interval.ms`*::
++
+.Description
+Interval in milliseconds of checking and invalidating meta cache when table
+      disabled or dropped, when set to zero means disable checking, suggest 
set it to 24h
+      or a higher value, because disable/delete table usually not very 
frequently.
++
+.Default
+`0`
 
 [[hbase.bulkload.retries.number]]
 *`hbase.bulkload.retries.number`*::

Reply via email to