huaxiangsun commented on a change in pull request #1986:
URL: https://github.com/apache/hbase/pull/1986#discussion_r453767757



##########
File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestRegionReplicaSplit.java
##########
@@ -109,11 +112,16 @@ public void testRegionReplicaSplitRegionAssignment() 
throws Exception {
         }
       }
       // There are 6 regions before split, 9 regions after split.
-      HTU.getAdmin().split(table.getName(), Bytes.toBytes(1));
+      HTU.getAdmin().split(table.getName(), Bytes.toBytes("d"));
       int count = 0;
       while (true) {
         for (RegionServerThread rs : 
HTU.getMiniHBaseCluster().getRegionServerThreads()) {
           for (Region r : rs.getRegionServer().getRegions(table.getName())) {
+            // Make sure that every region has some data (even for split 
daughter regions).
+            if (RegionReplicaUtil.isDefaultReplica(r.getRegionInfo())) {
+              assertTrue(r.getStore(f).hasReferences() ||

Review comment:
       That is per @busbey 's comments regarding with updating the split point, 
I think it is ok to make sure that after the split point change, every daughter 
region has some data, so coming up the assert. Since replica regions has some 
delay to map the data, the assert only makes sure that the primary(default) 
region gets data.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to