wchevreuil commented on code in PR #5241:
URL: https://github.com/apache/hbase/pull/5241#discussion_r1203763627
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetaRegionReplicaReplicationEndpoint.java:
##########
@@ -225,6 +227,38 @@ public void
testCatalogReplicaReplicationWithFlushAndCompaction() throws Excepti
}
}
+ @Test
+ public void testCatalogReplicaReplicationWALRolledAndDeleted() throws
Exception {
+ Connection connection =
ConnectionFactory.createConnection(HTU.getConfiguration());
+ TableName tableName = TableName.valueOf("hbase:meta");
+ Table table = connection.getTable(tableName);
+ try {
+ MiniHBaseCluster cluster = HTU.getHBaseCluster();
+ HRegionServer hrs =
cluster.getRegionServer(cluster.getServerHoldingMeta());
+ ReplicationSource source = (ReplicationSource)
hrs.getReplicationSourceService()
+ .getReplicationManager().catalogReplicationSource.get();
+ ((ReplicationPeerImpl) source.replicationPeer).setPeerState(false);
Review Comment:
Ok, there's a small chance for race conditions here, although I have run
this many times and never faced it.
Nevertheless, I'm putting extra checks to make sure we just proceed with
adding data once we are sure the source wal reader knows the peer is disabled
now. Please check, @Apache9 .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]