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



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ReversedClientScanner.java
##########
@@ -64,7 +64,9 @@ protected boolean setNewStartKey() {
 
   @Override
   protected ReversedScannerCallable createScannerCallable() {
+    // In case of meta, we want to support scan over a replica region.
+    int replicaId = (scan.getConsistency() == Consistency.TIMELINE) ? 
scan.getReplicaId() : 0;

Review comment:
       There is  no -1 involved. The flow is like that:
   1. If it is Consistency.STRONG, no replica involved.
   2. If it is Consistency.TIMELINE, and targetReplicaId is 0, it is the hedged 
read behavior (primary first, then go to replicas if no response within 
configured interval).
   3. If it is  Consistency.TIMELINE, and targetReplicaId is a valid replica 
id, go to the target replica region within the specified replica id.




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