You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by su...@apache.org on 2021/06/08 07:22:14 UTC

[iotdb] branch select_vector created (now 57dcaeb)

This is an automated email from the ASF dual-hosted git repository.

sunzesong pushed a change to branch select_vector
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


      at 57dcaeb  Ensure only one vector in one MetadataIndexTree

This branch includes the following new commits:

     new 57dcaeb  Ensure only one vector in one MetadataIndexTree

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[iotdb] 01/01: Ensure only one vector in one MetadataIndexTree

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sunzesong pushed a commit to branch select_vector
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 57dcaeb6323a49cdbfe62910c744b2c3bf71ca9f
Author: samperson1997 <sz...@mails.tsinghua.edu.cn>
AuthorDate: Tue Jun 8 15:20:42 2021 +0800

    Ensure only one vector in one MetadataIndexTree
---
 .../tsfile/file/metadata/MetadataIndexConstructor.java     | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/MetadataIndexConstructor.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/MetadataIndexConstructor.java
index 5944316..57a9b25 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/MetadataIndexConstructor.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/MetadataIndexConstructor.java
@@ -75,19 +75,15 @@ public class MetadataIndexConstructor {
             }
           }
 
-          // only add time column of vector into LEAF_MEASUREMENT node
-          if (currentIndexNode.getChildren().isEmpty()
-              || serializedTimeseriesMetadataNum + numOfValueColumns + 1
-                  > config.getMaxDegreeOfIndexNode() * 1.5) {
-            currentIndexNode.addEntry(
-                new MetadataIndexEntry(timeseriesMetadata.getMeasurementId(), out.getPosition()));
-            serializedTimeseriesMetadataNum = 0;
-          }
+          // for each vector, add time column of vector into LEAF_MEASUREMENT node
+          currentIndexNode.addEntry(
+              new MetadataIndexEntry(timeseriesMetadata.getMeasurementId(), out.getPosition()));
+          serializedTimeseriesMetadataNum = 0;
 
           timeseriesMetadata.serializeTo(out.wrapAsStream());
           serializedTimeseriesMetadataNum++;
           for (int j = 0; j < numOfValueColumns; j++) {
-            i += 1;
+            i++;
             timeseriesMetadata = entry.getValue().get(i);
             // value columns of vector should not be added into LEAF_MEASUREMENT node
             timeseriesMetadata.serializeTo(out.wrapAsStream());