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/01/23 06:47:50 UTC

[GitHub] [iotdb] wangchao316 commented on a change in pull request #2468: [ISSUE-2484] Fix creating timeseries error by using "create" or "insert" statement

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



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
##########
@@ -971,8 +994,32 @@ private boolean match(PartialPath fullPath, String[] prefixNodes) {
 
   }
 
-  protected MeasurementMNode getMeasurementMNode(MNode deviceMNode, String measurement) {
-    return (MeasurementMNode) deviceMNode.getChild(measurement);
+  protected MeasurementMNode getMeasurementMNode(MNode deviceMNode, String measurement,
+      TSDataType dataType, CompressionType compressionType) throws MetadataException {
+    MNode child = deviceMNode.getChild(measurement);  //可能会有不一致的问题,即写入文件的元数据中root.a.b.c.d,b不是measurement节点,然后内存中是,则需要修改文件中的

Review comment:
       Existing problems:
   1. The tsfile file that has been flushed to disks records the metadata before modification.
   2. If two tsfiles of different metadata exist, an error occurs during query. Whether the old tsfile can be read.
   So I suggest:
   Currently, time series cannot be modified. You can delete or recreate the file if necessary.
   存在问题:
   1.已经落盘的tsfile文件中记录的是修改之前的元数据。
   2.如果存在两个不同元数据的tsfile,查询的时候存在问题。是否能将旧tsfile读出来。
   所以我建议:
   我们当前不应该支持修改TimeSeries。如果需要修改,可以删除,重建。




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

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