SzyWilliam commented on code in PR #15014:
URL: https://github.com/apache/iotdb/pull/15014#discussion_r1992720749
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/cache/LoadCache.java:
##########
@@ -769,6 +776,22 @@ public void waitForLeaderElection(List<TConsensusGroupId>
regionGroupIds) {
regionGroupIds);
}
+ public void updateTopology(Map<Integer, Set<Integer>> latestTopology) {
+ if (!latestTopology.equals(topologyGraph)) {
+ LOGGER.info("[Topology Service] Cluster topology changed, latest: {}",
latestTopology);
+ topologyGraph = latestTopology;
+ topologyChanged.set(true);
+ }
+ }
+
+ @Nullable
+ public Map<Integer, Set<Integer>> getTopology() {
Review Comment:
1. Trigger topology probing on node change.
2. Sending Topology every 5 seconds.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]