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/05/09 11:48:00 UTC

[GitHub] [iotdb] samperson1997 commented on a change in pull request #3081: [IOTDB-1366] Refactor MetadataIndex in TsFile for Vector

samperson1997 commented on a change in pull request #3081:
URL: https://github.com/apache/iotdb/pull/3081#discussion_r628878850



##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/MetadataIndexConstructor.java
##########
@@ -61,18 +61,55 @@ public static MetadataIndexNode constructMetadataIndex(
       TimeseriesMetadata timeseriesMetadata;
       MetadataIndexNode currentIndexNode =
           new MetadataIndexNode(MetadataIndexNodeType.LEAF_MEASUREMENT);
+      int serializedTimeseriesMetadataNum = 0;
       for (int i = 0; i < entry.getValue().size(); i++) {
         timeseriesMetadata = entry.getValue().get(i);
-        // when constructing from leaf node, every "degree number of nodes" are related to an entry
-        if (i % config.getMaxDegreeOfIndexNode() == 0) {
-          if (currentIndexNode.isFull()) {
-            addCurrentIndexNodeToQueue(currentIndexNode, measurementMetadataIndexQueue, out);
-            currentIndexNode = new MetadataIndexNode(MetadataIndexNodeType.LEAF_MEASUREMENT);
+        if (timeseriesMetadata.getTimeSeriesMetadataType() == (byte) 0x80) {

Review comment:
       Refactored




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