You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HBASE-28443 Return too slow when scanning a table with non-existing REGION_REPLICA_ID - #5767
hbase:014:0> scan 't01', {CONSISTENCY =>"TIMELINE", REGION_REPLICA_ID => 2}
ROW COLUMN+CELL
ERROR: No location for t01, row='', locateType=CURRENT, replicaId=2
For usage try 'help "scan"'
Took 8.2960 seconds
Apply this PR:
hbase:009:0> scan 't01', {CONSISTENCY =>"TIMELINE", REGION_REPLICA_ID => 2}
ROW COLUMN+CELL
ERROR: The specified region replica id 2 does not exist, the REGION_REPLICATION of this table t01 is 2, this means that the maximum region replica id you can specify is 1.
For usage try 'help "scan"'
Took 0.0280 seconds
The old PR #5764 always run deleted test case, so i closed it, and reopen a new PR
Mind explaining more on why locating is so slow when the replica id does not exist?
Busying with other things, Sorry for the late reply.
In a short, hbase would retry 8 times (by default) if the location of specified region is not obtained, and this stage take a long time.
A detailed analysis for this situation against master branch
We will get RegionOfflineException if region replica id does not exist. Code is in here
// AsyncRegionLocator.getRegionLocation
// loc == null because region replica id does not exist
HRegionLocation loc = locs.getRegionLocation(replicaId);
if (loc == null) {
future.completeExceptionally(
new RegionOfflineException("No location for " + tableName + ", row='"
+ Bytes.toStringBinary(row) + "', locateType=" + type + ", replicaId=" + replicaId));
}
HBase would retry it over and over util the maxAttempts is reached when getting RegionOfflineException because this exception is not DoNotRetryIOException, Code is in here.
We are sure that the region does not exist in this situation, so no need to retry maybe is better.
So we can throw DoNotRetryIOException to avoid retrying in this situation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details see: HBASE-28443
Before this PR:
Apply this PR:
The old PR #5764 always run deleted test case, so i closed it, and reopen a new PR