diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java index a599d160ecc..724da1a2116 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java @@ -3759,7 +3759,8 @@ public class RSRpcServices extends HBaseRpcServicesBase 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 @@ public class RSRpcServices extends HBaseRpcServicesBase 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(),