Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,9 @@ public Result preIncrementAfterRowLock(ObserverContext<? extends RegionCoprocess
@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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,12 @@ public void testPreReplayWALsReadOnlyException() throws IOException {
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);
Expand Down