Skip to content

Commit b990b9e

Browse files
Enhance getLatestRegionRouteMap log for debugging #14830
Signed-off-by: OneSizeFitQuorum <[email protected]>
1 parent 338e715 commit b990b9e

File tree

2 files changed

+7
-1
lines changed
  • iotdb-core

2 files changed

+7
-1
lines changed

iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1806,9 +1806,10 @@ public TRegionRouteMapResp getLatestRegionRouteMap() {
18061806
} catch (InterruptedException e) {
18071807
Thread.currentThread().interrupt();
18081808
LOGGER.warn("Unexpected interruption during retry getting latest region route map");
1809+
resp.getStatus().setCode(TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode());
1810+
return resp;
18091811
}
18101812
}
1811-
18121813
resp.setTimestamp(System.currentTimeMillis());
18131814
resp.setRegionRouteMap(getLoadManager().getRegionPriorityMap());
18141815
}

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/cache/partition/PartitionCache.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,11 @@ public TRegionReplicaSet getRegionReplicaSet(TConsensusGroupId consensusGroupId)
549549
TRegionRouteMapResp resp = client.getLatestRegionRouteMap();
550550
if (TSStatusCode.SUCCESS_STATUS.getStatusCode() == resp.getStatus().getCode()) {
551551
updateGroupIdToReplicaSetMap(resp.getTimestamp(), resp.getRegionRouteMap());
552+
} else {
553+
logger.warn(
554+
"Unexpected error when getRegionReplicaSet: status {}, regionMap: {}",
555+
resp.getStatus(),
556+
resp.getRegionRouteMap());
552557
}
553558
// if configNode don't have then will throw RuntimeException
554559
if (!groupIdToReplicaSetMap.containsKey(consensusGroupId)) {

0 commit comments

Comments
 (0)