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/13 04:21:50 UTC

[GitHub] [iotdb] samperson1997 opened a new pull request #3180: [IOTDB-1378] Fix MetadataIndexTree constructs error when existing more than one chunks in vector

samperson1997 opened a new pull request #3180:
URL: https://github.com/apache/iotdb/pull/3180


   MetadataIndexTree constructs error when existing more than one chunks in vector.
   
   Here is an example.
   
   Change config ` avg_series_point_number_threshold` to `1`.
   
   Then, insert with aligned timeseries:
   ```
   private static void insertTabletWithAlignedTimeseries()
         throws IoTDBConnectionException, StatementExecutionException {
       // The schema of measurements of one device
       // only measurementId and data type in MeasurementSchema take effects in Tablet
       List<IMeasurementSchema> schemaList = new ArrayList<>();
       schemaList.add(
           new VectorMeasurementSchema(
               new String[] {"s1", "s2"}, new TSDataType[] {TSDataType.INT64, TSDataType.INT32}));
   
       Tablet tablet = new Tablet(ROOT_SG1_D1, schemaList, 1);
       long timestamp = System.currentTimeMillis();
   
       for (long row = 0; row < 5; row++) {
         int rowIndex = tablet.rowSize++;
         tablet.addTimestamp(rowIndex, timestamp);
         tablet.addValue(
             schemaList.get(0).getValueMeasurementIdList().get(0),
             rowIndex,
             new SecureRandom().nextLong());
         tablet.addValue(
             schemaList.get(0).getValueMeasurementIdList().get(1),
             rowIndex,
             new SecureRandom().nextInt());
   
         if (tablet.rowSize == tablet.getMaxRowNumber()) {
           session.insertTablet(tablet, true);
           tablet.reset();
         }
         timestamp++;
       }
   
       if (tablet.rowSize != 0) {
         session.insertTablet(tablet);
         tablet.reset();
       }
   
       session.executeNonQueryStatement("flush");
     }
   ```
   
   And query:
   ```
   SessionDataSet dataSet = session.executeQueryStatement("select * from root.sg_1.d1");
       System.out.println(dataSet.getColumnNames());
       while (dataSet.hasNext()) {
         System.out.println(dataSet.next());
       }
   ```


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



[GitHub] [iotdb] sonarcloud[bot] commented on pull request #3180: [IOTDB-1378] Fix MetadataIndexTree constructs error when existing more than one chunks in vector

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #3180:
URL: https://github.com/apache/iotdb/pull/3180#issuecomment-840299943


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3180&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3180&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3180&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3180&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3180&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3180&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3180&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3180&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3180&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3180&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3180&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3180&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3180&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3180&metric=new_coverage&view=list)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3180&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3180&metric=new_duplicated_lines_density&view=list)
   
   


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



[GitHub] [iotdb] HTHou merged pull request #3180: [IOTDB-1378] Fix MetadataIndexTree constructs error when existing more than one chunks in vector

Posted by GitBox <gi...@apache.org>.
HTHou merged pull request #3180:
URL: https://github.com/apache/iotdb/pull/3180


   


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