SzyWilliam commented on code in PR #15499:
URL: https://github.com/apache/iotdb/pull/15499#discussion_r2100398162


##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/service/TopologyService.java:
##########
@@ -228,7 +228,7 @@ private synchronized void topologyProbing() {
           && !failureDetector.isAvailable(entry.getKey(), entry.getValue())) {
         LOGGER.debug("Connection from DataNode {} to DataNode {} is broken", 
fromId, toId);
       } else {
-        latestTopology.get(fromId).add(toId);
+        Optional.ofNullable(latestTopology.get(fromId)).ifPresent(s -> 
s.add(toId));

Review Comment:
   Some keys are **intentionally** left out because these datanodes are 
starting and cannot answer to probing RPC requests. In that case, we should not 
include the starting nodes into our topology map.



-- 
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]

Reply via email to