Skip to content
Permalink
Browse files
HBASE-26394 Cache in RSRpcServices.executeProcedures does not take ef…
…fect (#3794)

Signed-off-by: Xiaolin Ha <haxiaolin@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
  • Loading branch information
comnetwork committed Oct 26, 2021
1 parent 7af5277 commit 773ff289678af7e9a511bf309311b6fde4f4c7dc
Showing 1 changed file with 5 additions and 1 deletion.
@@ -3759,7 +3759,8 @@ private void executeOpenRegionProcedures(OpenRegionRequest request,
long masterSystemTime = request.hasMasterSystemTime() ? request.getMasterSystemTime() : -1;
for (RegionOpenInfo regionOpenInfo : request.getOpenInfoList()) {
RegionInfo regionInfo = ProtobufUtil.toRegionInfo(regionOpenInfo.getRegion());
TableDescriptor tableDesc = tdCache.get(regionInfo.getTable());
TableName tableName = regionInfo.getTable();
TableDescriptor tableDesc = tdCache.get(tableName);
if (tableDesc == null) {
try {
tableDesc = server.getTableDescriptors().get(regionInfo.getTable());
@@ -3771,6 +3772,9 @@ private void executeOpenRegionProcedures(OpenRegionRequest request,
LOG.warn("Failed to get TableDescriptor of {}, will try again in the handler",
regionInfo.getTable(), e);
}
if(tableDesc != null) {
tdCache.put(tableName, tableDesc);
}
}
if (regionOpenInfo.getFavoredNodesCount() > 0) {
server.updateRegionFavoredNodesMapping(regionInfo.getEncodedName(),

0 comments on commit 773ff28

Please sign in to comment.