Skip to content
Permalink
Browse files
HBASE-26787 TestRegionReplicaReplicationError should inject error in …
…replicateToReplica method (#4148)
  • Loading branch information
comnetwork committed Mar 3, 2022
1 parent b81ddd8 commit 1b994a179bc716bb336b8976ac31cdc866c4cb10
Showing 1 changed file with 3 additions and 4 deletions.
@@ -76,8 +76,8 @@ public ErrorReplayRSRpcServices(HRegionServer rs) throws IOException {
}

@Override
public ReplicateWALEntryResponse replay(RpcController controller,
ReplicateWALEntryRequest request) throws ServiceException {
public ReplicateWALEntryResponse replicateToReplica(RpcController controller,
ReplicateWALEntryRequest request) throws ServiceException {
List<WALEntry> entries = request.getEntryList();
if (CollectionUtils.isEmpty(entries)) {
return ReplicateWALEntryResponse.getDefaultInstance();
@@ -93,9 +93,8 @@ public ReplicateWALEntryResponse replay(RpcController controller,
if (region.getRegionInfo().getReplicaId() == 1 && count.addAndGet(entries.size()) < 100) {
throw new ServiceException("Inject error!");
}
return super.replay(controller, request);
return super.replicateToReplica(controller, request);
}

}

public static final class RSForTest

0 comments on commit 1b994a1

Please sign in to comment.