[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #1411: [IOTDB-706] Introduce virtual memtable for larger Chunk
sonarcloud[bot] removed a comment on pull request #1411: URL: https://github.com/apache/incubator-iotdb/pull/1411#issuecomment-648859628 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=VULNERABILITY) [6 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=CODE_SMELL) [22 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1411) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1411=new_duplicated_lines_density=list) [6.8% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1411=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1411: [IOTDB-706] Introduce virtual memtable for larger Chunk
sonarcloud[bot] commented on pull request #1411: URL: https://github.com/apache/incubator-iotdb/pull/1411#issuecomment-650701125 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=VULNERABILITY) [9 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=CODE_SMELL) [36 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1411=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1411) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1411=new_duplicated_lines_density=list) [5.9% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1411=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] kqkdChen commented on issue #1425: SQL执行时间怎样优化到毫秒级别?还是说根本就不可能?
kqkdChen commented on issue #1425: URL: https://github.com/apache/incubator-iotdb/issues/1425#issuecomment-650695760 CPU Cores: 8 Total, 29% CPU Ratio JVM Memory: 1969 1969 1295 (Max/Total/Free)MB Host Memory: 16 GB Total, 5.0 GB Used 1894条数据 count 下竟然将近9秒。 ![image](https://user-images.githubusercontent.com/41674301/85938217-ca83cb80-b93d-11ea-88b8-a839a7801c10.png) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] kqkdChen opened a new issue #1425: SQL执行时间怎样优化到毫秒级别?还是说根本就不可能?
kqkdChen opened a new issue #1425: URL: https://github.com/apache/incubator-iotdb/issues/1425 data count: **1894** total SQL: **select * from root.position where time > 1559179819000 limit 10** 执行上述sql: shell client显示花费时间: **6.171S** ![image](https://user-images.githubusercontent.com/41674301/85938068-3f560600-b93c-11ea-8d32-191462885398.png) IOTDB Metrics Server:**0-7ms??** ![image](https://user-images.githubusercontent.com/41674301/85938110-8217de00-b93c-11ea-9b86-6abbabbf30b1.png) 为什么两者差别如此之大? 我还尝试使用jdbc api,时间花费在5s,我以为查询会很强,没想到这么弱,感觉比不上HBase... 这是你们的产品介绍,我不知道是否是我的用法有问题,查询根本做不到毫秒级别,超过300W数据就已经是秒级别了,官网的文档也不详细,基本的性能调优我都没有找到。 ![image](https://user-images.githubusercontent.com/41674301/85938135-cefbb480-b93c-11ea-8b00-8d58f4527686.png) 求解惑,还有尽快完善文档吧,连集群模式都没有,生产谁敢用... 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1423: [IOTDB-782] [Experimental] Clear mlog when creating snapshot
sonarcloud[bot] commented on pull request #1423: URL: https://github.com/apache/incubator-iotdb/pull/1423#issuecomment-650691327 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1423) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1423=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1423=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #1423: [IOTDB-782] [Experimental] Clear mlog when creating snapshot
sonarcloud[bot] removed a comment on pull request #1423: URL: https://github.com/apache/incubator-iotdb/pull/1423#issuecomment-650351437 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1423=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1423) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1423=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1423=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #1326: premerge for the distributed version
sonarcloud[bot] removed a comment on pull request #1326: URL: https://github.com/apache/incubator-iotdb/pull/1326#issuecomment-650675428 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL) [12 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326=new_duplicated_lines_density=list) [14.8% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1326: premerge for the distributed version
sonarcloud[bot] commented on pull request #1326: URL: https://github.com/apache/incubator-iotdb/pull/1326#issuecomment-650689310 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL) [9 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326=new_duplicated_lines_density=list) [14.6% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #460: [IOTDB-68] New shared-nothing cluster
sonarcloud[bot] commented on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-650688229 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG) [8 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL) [148 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #460: [IOTDB-68] New shared-nothing cluster
sonarcloud[bot] removed a comment on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-650674891 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG) [8 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL) [147 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] qiaojialin merged pull request #1413: [IOTDB-775] Add SQL of creating snapshot manually
qiaojialin merged pull request #1413: URL: https://github.com/apache/incubator-iotdb/pull/1413 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] jt2594838 merged pull request #1422: [Distributed] Remove unnecessary persistence
jt2594838 merged pull request #1422: URL: https://github.com/apache/incubator-iotdb/pull/1422 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] Alima777 commented on a change in pull request #1399: [IOTDB-736] Query performance tracing
Alima777 commented on a change in pull request #1399: URL: https://github.com/apache/incubator-iotdb/pull/1399#discussion_r446200347 ## File path: server/src/main/java/org/apache/iotdb/db/query/control/TracingManager.java ## @@ -0,0 +1,145 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iotdb.db.query.control; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.text.SimpleDateFormat; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.fileSystem.SystemFileFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class TracingManager { + + private static final Logger logger = LoggerFactory.getLogger(TracingManager.class); + private BufferedWriter writer; + + public TracingManager(String dirName, String logFileName) { +File tracingDir = SystemFileFactory.INSTANCE.getFile(dirName); +if (!tracingDir.exists()) { + if (tracingDir.mkdirs()) { +logger.info("create performance folder {}.", tracingDir); + } else { +logger.info("create performance folder {} failed.", tracingDir); + } +} +File logFile = SystemFileFactory.INSTANCE.getFile(dirName + File.separator + logFileName); + +FileWriter fileWriter = null; +try { + fileWriter = new FileWriter(logFile, true); +} catch (IOException e) { + logger.error("Meeting error while creating TracingManager: {}", e); +} +writer = new BufferedWriter(fileWriter); + } + + public static TracingManager getInstance() { +return TracingManagerHelper.INSTANCE; + } + + public void writeQueryInfo(long queryId, String statement, int pathsNum) throws IOException { +StringBuilder builder = new StringBuilder("-\n"); +builder.append("Query Id: ").append(queryId) +.append(" - Query Statement: ").append(statement) +.append("\nQuery Id: ").append(queryId) +.append(" - Start time: ") +.append(new SimpleDateFormat("-MM-dd HH:mm:ss.SSS").format(System.currentTimeMillis())) +.append("\nQuery Id: ").append(queryId) +.append(" - Number of series paths: ").append(pathsNum); +synchronized (writer) { + writer.write(builder.toString()); +} +writer.newLine(); + } + + // for align by device query + public void writeQueryInfo(long queryId, String statement) throws IOException { +StringBuilder builder = new StringBuilder("-\n"); +builder.append("Query Id: ").append(queryId) +.append(" - Query Statement: ").append(statement) +.append("\nQuery Id: ").append(queryId) +.append(" - Start time: ") +.append(new SimpleDateFormat("-MM-dd HH:mm:ss.SSS").format(System.currentTimeMillis())); +synchronized (writer) { + writer.write(builder.toString()); +} +writer.newLine(); + } + + public void writePathsNum(long queryId, int pathsNum) throws IOException { +StringBuilder builder = new StringBuilder("Query Id: ").append(queryId) +.append(" - Number of series paths: ").append(pathsNum); +synchronized (writer) { + writer.write(builder.toString()); +} +writer.newLine(); Review comment: Actually, I researched and also did a test by myself, the process of BufferedWriter.write() self is thread safe... For example, thread A invokes `writer.write("aaa")`, thread B invokes `writer.write("bbb")`, the result will only be "aaabbb" Or "bbbaaa". So the `synchronized` is not needed. And writer.flush() is also needed. Sorry, I will change all back. Remove `synchronized` and add flush() back. 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] Alima777 commented on a change in pull request #1399: [IOTDB-736] Query performance tracing
Alima777 commented on a change in pull request #1399: URL: https://github.com/apache/incubator-iotdb/pull/1399#discussion_r446593235 ## File path: server/src/main/java/org/apache/iotdb/db/query/control/QueryResourceManager.java ## @@ -85,20 +110,50 @@ public void registerTempExternalSortFile(long queryId, externalSortFileMap.computeIfAbsent(queryId, x -> new ArrayList<>()).add(deserializer); } - public QueryDataSource getQueryDataSource(Path selectedPath, QueryContext context, Filter filter) throws StorageEngineException, QueryProcessException { SingleSeriesExpression singleSeriesExpression = new SingleSeriesExpression(selectedPath, filter); -return StorageEngine.getInstance().query(singleSeriesExpression, context, filePathsManager); +QueryDataSource queryDataSource = StorageEngine.getInstance() +.query(singleSeriesExpression, context, filePathsManager); +// calculate the distinct number of seq and unseq tsfiles +if (config.isEnablePerformanceTracing()) { + seqFileNumMap.computeIfAbsent(context.getQueryId(), k -> new HashSet<>()) + .addAll(queryDataSource.getSeqResources()); Review comment: And it will reflect the correct performance in case the tsfileResources are GC and reloaded from disk in the future. 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] Alima777 commented on a change in pull request #1399: [IOTDB-736] Query performance tracing
Alima777 commented on a change in pull request #1399: URL: https://github.com/apache/incubator-iotdb/pull/1399#discussion_r446593110 ## File path: server/src/main/java/org/apache/iotdb/db/query/control/QueryResourceManager.java ## @@ -85,20 +110,50 @@ public void registerTempExternalSortFile(long queryId, externalSortFileMap.computeIfAbsent(queryId, x -> new ArrayList<>()).add(deserializer); } - public QueryDataSource getQueryDataSource(Path selectedPath, QueryContext context, Filter filter) throws StorageEngineException, QueryProcessException { SingleSeriesExpression singleSeriesExpression = new SingleSeriesExpression(selectedPath, filter); -return StorageEngine.getInstance().query(singleSeriesExpression, context, filePathsManager); +QueryDataSource queryDataSource = StorageEngine.getInstance() +.query(singleSeriesExpression, context, filePathsManager); +// calculate the distinct number of seq and unseq tsfiles +if (config.isEnablePerformanceTracing()) { + seqFileNumMap.computeIfAbsent(context.getQueryId(), k -> new HashSet<>()) + .addAll(queryDataSource.getSeqResources()); Review comment: Hi, I replace those objects with WeakReference as you said. I believe it will make sense in the GC. Thank you very much for your good suggestion. Please check it. 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1326: premerge for the distributed version
sonarcloud[bot] commented on pull request #1326: URL: https://github.com/apache/incubator-iotdb/pull/1326#issuecomment-650675428 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL) [12 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326=new_duplicated_lines_density=list) [14.8% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #1326: premerge for the distributed version
sonarcloud[bot] removed a comment on pull request #1326: URL: https://github.com/apache/incubator-iotdb/pull/1326#issuecomment-647236487 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL) [12 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326=new_duplicated_lines_density=list) [14.4% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326=new_duplicated_lines_density=list) The version of Java (1.8.0_242) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #460: [IOTDB-68] New shared-nothing cluster
sonarcloud[bot] removed a comment on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-648697099 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG) [8 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL) [147 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list) The version of Java (1.8.0_242) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #460: [IOTDB-68] New shared-nothing cluster
sonarcloud[bot] commented on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-650674891 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG) [8 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL) [147 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] qiaojialin merged pull request #1424: [Hot_compaction] add file exists judgment
qiaojialin merged pull request #1424: URL: https://github.com/apache/incubator-iotdb/pull/1424 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] zhanglingzhe0820 opened a new pull request #1424: and file exists judgment
zhanglingzhe0820 opened a new pull request #1424: URL: https://github.com/apache/incubator-iotdb/pull/1424 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #1413: [IOTDB-775] Add SQL of creating snapshot manually
sonarcloud[bot] removed a comment on pull request #1413: URL: https://github.com/apache/incubator-iotdb/pull/1413#issuecomment-650270001 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1413) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1413=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1413=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1413: [IOTDB-775] Add SQL of creating snapshot manually
sonarcloud[bot] commented on pull request #1413: URL: https://github.com/apache/incubator-iotdb/pull/1413#issuecomment-650526513 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1413=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1413) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1413=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1413=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] samperson1997 commented on a change in pull request #1413: [IOTDB-775] Add SQL of creating snapshot manually
samperson1997 commented on a change in pull request #1413: URL: https://github.com/apache/incubator-iotdb/pull/1413#discussion_r446502773 ## File path: server/src/main/java/org/apache/iotdb/db/qp/Planner.java ## @@ -100,6 +100,7 @@ protected Operator logicalOptimize(Operator operator) case CLEAR_CACHE: case NULL: case SHOW_MERGE_STATUS: + case CREATE_SNAPSHOT: Review comment: Fixed 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: us...@infra.apache.org
[GitHub] [incubator-iotdb] samperson1997 commented on a change in pull request #1413: [IOTDB-775] Add SQL of creating snapshot manually
samperson1997 commented on a change in pull request #1413: URL: https://github.com/apache/incubator-iotdb/pull/1413#discussion_r446502821 ## File path: server/src/main/java/org/apache/iotdb/db/qp/logical/Operator.java ## @@ -76,6 +76,6 @@ public String toString() { GRANT_WATERMARK_EMBEDDING, REVOKE_WATERMARK_EMBEDDING, TTL, DELETE_STORAGE_GROUP, LOAD_CONFIGURATION, SHOW, LOAD_FILES, REMOVE_FILE, MOVE_FILE, LAST, GROUP_BY_FILL, ALTER_TIMESERIES, FLUSH, MERGE, FULL_MERGE, CLEAR_CACHE, -SHOW_MERGE_STATUS +SHOW_MERGE_STATUS, CREATE_SNAPSHOT Review comment: Fixed ## File path: server/src/main/java/org/apache/iotdb/db/qp/constant/SQLConstant.java ## @@ -152,6 +152,8 @@ private SQLConstant() { public static final int TOK_SHOW_MERGE_STATUS = 87; + public static final int TOK_CREATE_SNAPSHOT = 88; Review comment: Fixed 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: us...@infra.apache.org