You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by an...@apache.org on 2026/03/13 20:01:30 UTC
(hbase) 22/26: HBASE-29961 Secondary cluster is unable to replayWAL for meta (#7854)
This is an automated email from the ASF dual-hosted git repository.
andor pushed a commit to branch HBASE-29081_rebased
in repository https://gitbox.apache.org/repos/asf/hbase.git
commit c5e470dec29337c6cc41087fe0d1f7bb11c972ff
Author: Anuj Sharma <sh...@gmail.com>
AuthorDate: Tue Mar 10 03:07:22 2026 +0530
HBASE-29961 Secondary cluster is unable to replayWAL for meta (#7854)
---
.../hadoop/hbase/security/access/RegionReadOnlyController.java | 4 +++-
.../hbase/security/access/TestReadOnlyControllerRegionObserver.java | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/RegionReadOnlyController.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/RegionReadOnlyController.java
index ecd2dcedd64..411b4459f12 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/RegionReadOnlyController.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/RegionReadOnlyController.java
@@ -339,7 +339,9 @@ public class RegionReadOnlyController extends AbstractReadOnlyController
@Override
public void preReplayWALs(ObserverContext<? extends RegionCoprocessorEnvironment> ctx,
RegionInfo info, Path edits) throws IOException {
- internalReadOnlyGuard();
+ if (!isOnMeta(ctx)) {
+ internalReadOnlyGuard();
+ }
RegionObserver.super.preReplayWALs(ctx, info, edits);
}
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestReadOnlyControllerRegionObserver.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestReadOnlyControllerRegionObserver.java
index b2e53860124..d7176b90055 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestReadOnlyControllerRegionObserver.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestReadOnlyControllerRegionObserver.java
@@ -454,6 +454,12 @@ public class TestReadOnlyControllerRegionObserver {
regionReadOnlyController.preReplayWALs(ctx, info, edits);
}
+ @Test
+ public void testPreReplayWALsReadOnlyMetaNoException() throws IOException {
+ mockOperationForMetaTable();
+ regionReadOnlyController.preReplayWALs(ctx, info, edits);
+ }
+
@Test(expected = DoNotRetryIOException.class)
public void testPreBulkLoadHFileReadOnlyException() throws IOException {
regionReadOnlyController.preBulkLoadHFile(ctx, familyPaths);