You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/08/09 07:10:30 UTC

[GitHub] [iotdb] MiniSho opened a new pull request, #6930: [IOTDB-4067] Handle null pointer in getRegisteredNodeInfoList

MiniSho opened a new pull request, #6930:
URL: https://github.com/apache/iotdb/pull/6930

   add handling of null pointer when NodeCacheMap doesn't find the NodeId, and set the status as  "Unknown".


-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] Beyyes commented on a diff in pull request #6930: [IOTDB-4067] Handle null pointer in getRegisteredNodeInfoList

Posted by GitBox <gi...@apache.org>.
Beyyes commented on code in PR #6930:
URL: https://github.com/apache/iotdb/pull/6930#discussion_r941930326


##########
confignode/src/main/java/org/apache/iotdb/confignode/manager/NodeManager.java:
##########
@@ -232,8 +234,12 @@ public List<TDataNodeInfo> getRegisteredDataNodeInfoList() {
             TDataNodeInfo info = new TDataNodeInfo();
             int dataNodeId = dataNodeInfo.getLocation().getDataNodeId();
             info.setDataNodeId(dataNodeId);
-            info.setStatus(
-                getLoadManager().getNodeCacheMap().get(dataNodeId).getNodeStatus().getStatus());
+            INodeCache nodeCache = getLoadManager().getNodeCacheMap().get(dataNodeId);

Review Comment:
   Make an encapsulation for getNodeCache instead of using map.get() method~



-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] Beyyes merged pull request #6930: [IOTDB-4067] Handle null pointer in getRegisteredNodeInfoList

Posted by GitBox <gi...@apache.org>.
Beyyes merged PR #6930:
URL: https://github.com/apache/iotdb/pull/6930


-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] MiniSho commented on a diff in pull request #6930: [IOTDB-4067] Handle null pointer in getRegisteredNodeInfoList

Posted by GitBox <gi...@apache.org>.
MiniSho commented on code in PR #6930:
URL: https://github.com/apache/iotdb/pull/6930#discussion_r941962602


##########
confignode/src/main/java/org/apache/iotdb/confignode/manager/NodeManager.java:
##########
@@ -232,8 +234,12 @@ public List<TDataNodeInfo> getRegisteredDataNodeInfoList() {
             TDataNodeInfo info = new TDataNodeInfo();
             int dataNodeId = dataNodeInfo.getLocation().getDataNodeId();
             info.setDataNodeId(dataNodeId);
-            info.setStatus(
-                getLoadManager().getNodeCacheMap().get(dataNodeId).getNodeStatus().getStatus());
+            INodeCache nodeCache = getLoadManager().getNodeCacheMap().get(dataNodeId);

Review Comment:
   done



-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] MiniSho commented on pull request #6930: [IOTDB-4067] Handle null pointer in getRegisteredNodeInfoList

Posted by GitBox <gi...@apache.org>.
MiniSho commented on PR #6930:
URL: https://github.com/apache/iotdb/pull/6930#issuecomment-1210197541

   already checked showCluster, showConfigNodes, showDataNodes and showRegion, and didn't find any hidden danger


-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org