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 2021/07/07 12:41:32 UTC

[GitHub] [iotdb] wangchao316 commented on a change in pull request #3525: Fix template restart bug

wangchao316 commented on a change in pull request #3525:
URL: https://github.com/apache/iotdb/pull/3525#discussion_r665331490



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
##########
@@ -804,10 +804,12 @@ public TSDataType getSeriesType(PartialPath path) throws MetadataException {
 
   public MeasurementMNode[] getMNodes(PartialPath deviceId, String[] measurements)
       throws MetadataException {
-    MNode deviceNode = getNodeByPath(deviceId);
     MeasurementMNode[] mNodes = new MeasurementMNode[measurements.length];
     for (int i = 0; i < mNodes.length; i++) {
-      mNodes[i] = ((MeasurementMNode) deviceNode.getChild(measurements[i]));
+      try {
+        mNodes[i] = (MeasurementMNode) getNodeByPath(deviceId.concatNode(measurements[i]));
+      } catch (PathNotExistException ignored) {
+      }

Review comment:
       hi,  I have a minor..
   If an exception occurs, a line of logs must be recorded to facilitate fault tracing.




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