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



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
##########
@@ -435,6 +475,14 @@ private void locateInMeta(TableName tableName, 
LocateRequest req) {
       .setReadType(ReadType.PREAD);
     if (useMetaReplicas) {
       scan.setConsistency(Consistency.TIMELINE);
+
+      // If it is meta replica LoadBalance mode, pick up a meta replica to 
scan. It will try to
+      // pick up meta replica region to scan, in certain error cases, it may 
pick primary meta
+      // region to scan.
+      if (isMetaReplicaLBMode()) {
+        scan.setReplicaId(this.metaReplicaChooser.chooseReplicaToGo(tableName,

Review comment:
       Mark here. Just realized that there is a logical bug issue. When 
chooseReplicaToGo() returns primary region to go, in this case, it should unset 
TIMELINE. Otherwise, it will fall back to HighlyAvailable mode, which is not 
what we want here.




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