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/09/16 07:22:48 UTC

[GitHub] [iotdb] JackieTien97 opened a new pull request #3979: [IOTDB-1691] Wrong way of calculating the vector's memory footprint

JackieTien97 opened a new pull request #3979:
URL: https://github.com/apache/iotdb/pull/3979


   [JIRA-1691](https://issues.apache.org/jira/browse/IOTDB-1691)


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



[GitHub] [iotdb] HTHou commented on a change in pull request #3979: [IOTDB-1691] Wrong way of calculating the vector's memory footprint

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #3979:
URL: https://github.com/apache/iotdb/pull/3979#discussion_r709860352



##########
File path: server/src/main/java/org/apache/iotdb/db/utils/MemUtils.java
##########
@@ -101,40 +101,32 @@ public static long getRecordSize(
       return 0L;
     }
     long memSize = 0;
-    int columnCount = 0;
+    boolean hasVector = false;
     for (int i = 0; i < insertTabletPlan.getMeasurementMNodes().length; i++) {
       if (insertTabletPlan.getMeasurementMNodes()[i] == null) {
-        columnCount++;
         continue;
       }
       IMeasurementSchema schema = insertTabletPlan.getMeasurementMNodes()[i].getSchema();
+      TSDataType valueType;
       if (schema.getType() == TSDataType.VECTOR) {

Review comment:
       Can we use `if (insertTabletPlan.isAligned()) ` here?




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



[GitHub] [iotdb] sonarcloud[bot] removed a comment on pull request #3979: [IOTDB-1691] Wrong way of calculating the vector's memory footprint

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #3979:
URL: https://github.com/apache/iotdb/pull/3979#issuecomment-920686877


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

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



[GitHub] [iotdb] HTHou commented on a change in pull request #3979: [IOTDB-1691] Wrong way of calculating the vector's memory footprint

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #3979:
URL: https://github.com/apache/iotdb/pull/3979#discussion_r711178794



##########
File path: server/src/main/java/org/apache/iotdb/db/utils/MemUtils.java
##########
@@ -101,40 +101,32 @@ public static long getRecordSize(
       return 0L;
     }
     long memSize = 0;
-    int columnCount = 0;
+    boolean hasVector = false;
     for (int i = 0; i < insertTabletPlan.getMeasurementMNodes().length; i++) {
       if (insertTabletPlan.getMeasurementMNodes()[i] == null) {
-        columnCount++;
         continue;
       }
       IMeasurementSchema schema = insertTabletPlan.getMeasurementMNodes()[i].getSchema();
+      TSDataType valueType;
       if (schema.getType() == TSDataType.VECTOR) {

Review comment:
       ```suggestion
         if (insertTabletPlan.isAligned()) {
   ```
   ```suggestion
         if (schema.getType() == TSDataType.VECTOR) {
   ```

##########
File path: server/src/main/java/org/apache/iotdb/db/utils/MemUtils.java
##########
@@ -101,40 +101,32 @@ public static long getRecordSize(
       return 0L;
     }
     long memSize = 0;
-    int columnCount = 0;
+    boolean hasVector = false;
     for (int i = 0; i < insertTabletPlan.getMeasurementMNodes().length; i++) {
       if (insertTabletPlan.getMeasurementMNodes()[i] == null) {
-        columnCount++;
         continue;
       }
       IMeasurementSchema schema = insertTabletPlan.getMeasurementMNodes()[i].getSchema();
+      TSDataType valueType;
       if (schema.getType() == TSDataType.VECTOR) {

Review comment:
       ```suggestion
         if (insertTabletPlan.isAligned()) {
   ```
   




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



[GitHub] [iotdb] HTHou merged pull request #3979: [IOTDB-1691] Wrong way of calculating the vector's memory footprint

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


   


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



[GitHub] [iotdb] coveralls commented on pull request #3979: [IOTDB-1691] Wrong way of calculating the vector's memory footprint

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #3979:
URL: https://github.com/apache/iotdb/pull/3979#issuecomment-920682748


   
   [![Coverage Status](https://coveralls.io/builds/42915150/badge)](https://coveralls.io/builds/42915150)
   
   Coverage increased (+0.03%) to 67.505% when pulling **3c0d29a71c802ec05705d67e10a5f674e265107f on VectorTest** into **e5d86c9d1d5de1934c77d2ea4f97f8cd6d669bb8 on master**.
   


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



[GitHub] [iotdb] sonarcloud[bot] commented on pull request #3979: [IOTDB-1691] Wrong way of calculating the vector's memory footprint

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


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

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



[GitHub] [iotdb] HTHou commented on a change in pull request #3979: [IOTDB-1691] Wrong way of calculating the vector's memory footprint

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #3979:
URL: https://github.com/apache/iotdb/pull/3979#discussion_r709860352



##########
File path: server/src/main/java/org/apache/iotdb/db/utils/MemUtils.java
##########
@@ -101,40 +101,32 @@ public static long getRecordSize(
       return 0L;
     }
     long memSize = 0;
-    int columnCount = 0;
+    boolean hasVector = false;
     for (int i = 0; i < insertTabletPlan.getMeasurementMNodes().length; i++) {
       if (insertTabletPlan.getMeasurementMNodes()[i] == null) {
-        columnCount++;
         continue;
       }
       IMeasurementSchema schema = insertTabletPlan.getMeasurementMNodes()[i].getSchema();
+      TSDataType valueType;
       if (schema.getType() == TSDataType.VECTOR) {

Review comment:
       Can we use `if (insertTabletPlan.isAlign) ` here?




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



[GitHub] [iotdb] coveralls edited a comment on pull request #3979: [IOTDB-1691] Wrong way of calculating the vector's memory footprint

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3979:
URL: https://github.com/apache/iotdb/pull/3979#issuecomment-920682748


   
   [![Coverage Status](https://coveralls.io/builds/42956794/badge)](https://coveralls.io/builds/42956794)
   
   Coverage increased (+0.05%) to 67.524% when pulling **cfc7c312a725ce8ff9fdf6e1a1b8af1afa30d917 on VectorTest** into **e5d86c9d1d5de1934c77d2ea4f97f8cd6d669bb8 on master**.
   


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



[GitHub] [iotdb] sonarcloud[bot] commented on pull request #3979: [IOTDB-1691] Wrong way of calculating the vector's memory footprint

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


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

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