[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-646410929 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [8 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [7 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [136 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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-646443929 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [8 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [7 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [136 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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 #1289: Add force stop storage engine interface
sonarcloud[bot] commented on pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#issuecomment-646428689 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=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 #1289: Add force stop storage engine interface
sonarcloud[bot] removed a comment on pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#issuecomment-646152066 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=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 #1369: add compression keyword
sonarcloud[bot] removed a comment on pull request #1369: URL: https://github.com/apache/incubator-iotdb/pull/1369#issuecomment-646183798 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1369) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1369&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1369&metric=new_duplicated_lines_density&view=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 #1369: add compression keyword
sonarcloud[bot] commented on pull request #1369: URL: https://github.com/apache/incubator-iotdb/pull/1369#issuecomment-646425806 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1369) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1369&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1369&metric=new_duplicated_lines_density&view=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] neuyilan commented on a change in pull request #1387: Create schema automatically
neuyilan commented on a change in pull request #1387: URL: https://github.com/apache/incubator-iotdb/pull/1387#discussion_r442608933 ## File path: cluster/src/main/java/org/apache/iotdb/cluster/server/member/MetaGroupMember.java ## @@ -1520,12 +1534,31 @@ private TSStatus processPartitionedPlan(PhysicalPlan plan) throws UnsupportedPla } catch (MetadataException e) { logger.error("Cannot route plan {}", plan, e); } -// the storage group is not found locally, forward it to the leader +// the storage group is not found locally if (planGroupMap == null || planGroupMap.isEmpty()) { - logger.debug("{}: Cannot found storage groups for {}", name, plan); + if (plan instanceof InsertPlan && IoTDBDescriptor.getInstance().getConfig() Review comment: How about CreateTimeSeriesPlan? and other plans which can cause first check storage group exist or not ? 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-645928919 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [5 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [7 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [125 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.1% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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-646410929 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [8 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [7 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [136 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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] jt2594838 commented on a change in pull request #1387: Create schema automatically
jt2594838 commented on a change in pull request #1387: URL: https://github.com/apache/incubator-iotdb/pull/1387#discussion_r442598352 ## File path: cluster/src/main/java/org/apache/iotdb/cluster/server/member/MetaGroupMember.java ## @@ -1551,6 +1584,20 @@ TSStatus forwardPlan(Map planGroupMap) { subStatus = forwardPlan(entry.getKey(), entry.getValue()); } if (subStatus.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { +if (entry.getKey() instanceof InsertPlan +&& subStatus.getCode() == TSStatusCode.STORAGE_ENGINE_ERROR.getStatusCode() +&& IoTDBDescriptor.getInstance().getConfig().isAutoCreateSchemaEnabled()) { + // try to create timeseries + boolean hasCreate = autoCreateTimeseries((InsertPlan) entry.getKey(), entry.getValue()); Review comment: "entry.getValue()" is the data group you are going to send the plan to, and it may not be the group that should hold the metadata, so create timeseries plans should be forward to the group that should hold the metadata. ## File path: cluster/src/main/java/org/apache/iotdb/cluster/server/member/MetaGroupMember.java ## @@ -1520,12 +1534,31 @@ private TSStatus processPartitionedPlan(PhysicalPlan plan) throws UnsupportedPla } catch (MetadataException e) { logger.error("Cannot route plan {}", plan, e); } -// the storage group is not found locally, forward it to the leader +// the storage group is not found locally if (planGroupMap == null || planGroupMap.isEmpty()) { - logger.debug("{}: Cannot found storage groups for {}", name, plan); + if (plan instanceof InsertPlan && IoTDBDescriptor.getInstance().getConfig() + .isAutoCreateSchemaEnabled()) { +// try to set storage group +String deviceId = ((InsertPlan) plan).getDeviceId(); +try { + String storageGroupName = MetaUtils + .getStorageGroupNameByLevel(deviceId, IoTDBDescriptor.getInstance() + .getConfig().getDefaultStorageGroupLevel()); + SetStorageGroupPlan setStorageGroupPlan = new SetStorageGroupPlan( + new Path(storageGroupName)); + TSStatus setStorageGroupResult = executeNonQuery(setStorageGroupPlan); + if (setStorageGroupResult.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { +throw new MetadataException("Failed to set storage group " + storageGroupName); + } + return executeNonQuery(plan); +} catch (MetadataException e) { + logger.info("Failed to set storage group of device id {}", deviceId); +} + } + logger.error("{}: Cannot found storage groups for {}", name, plan); return StatusUtils.NO_STORAGE_GROUP; } -logger.debug("{}: The data groups of {} are {}", name, plan, planGroupMap); +logger.error("{}: The data groups of {} are {}", name, plan, planGroupMap); Review comment: This should still be debug. ## File path: cluster/src/main/java/org/apache/iotdb/cluster/server/member/MetaGroupMember.java ## @@ -1569,6 +1616,70 @@ TSStatus forwardPlan(Map planGroupMap) { return status; } + /** + * Create timeseries automatically + * @param insertPlan, some of the timeseries in it are not created yet + * @param partitionGroup + * @return true of all uncreated timeseries are created + */ + boolean autoCreateTimeseries(InsertPlan insertPlan, PartitionGroup partitionGroup) { +List seriesList = new ArrayList<>(); +String deviceId = insertPlan.getDeviceId(); +for (String measurementId : insertPlan.getMeasurements()) { + seriesList.add( + new StringContainer(new String[]{deviceId, measurementId}, TsFileConstant.PATH_SEPARATOR) + .toString()); +} +List unregisteredSeriesList = getUnregisteredSeriesList(seriesList, partitionGroup); +for (String seriesPath : unregisteredSeriesList) { + int index = seriesList.indexOf(seriesPath); + TSDataType dataType = TypeInferenceUtils + .getPredictedDataType(insertPlan.getValues()[index], true); + TSEncoding encoding = getDefaultEncoding(dataType); + CompressionType compressionType = TSFileDescriptor.getInstance().getConfig().getCompressor(); + CreateTimeSeriesPlan createTimeSeriesPlan = new CreateTimeSeriesPlan(new Path(seriesPath), + dataType, encoding, compressionType, null, null, null, null); + TSStatus result = executeNonQuery(createTimeSeriesPlan); + if (result.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { +logger.error("{} failed to execute create timeseries {}", thisNode, seriesPath); +return false; Review comment: The schema may be auto-created concurrently, so I think the status code should be carefully checked, and if it says that the timeseries are already created, we should also return true. ## File
[GitHub] [incubator-iotdb] Genius-pig commented on a change in pull request #1369: add compression keyword
Genius-pig commented on a change in pull request #1369: URL: https://github.com/apache/incubator-iotdb/pull/1369#discussion_r442596946 ## File path: docs/UserGuide/Operation Manual/SQL Reference.md ## @@ -32,14 +32,12 @@ All of these statements are write in IoTDB's own syntax, for details about the s ## Keywords -Please not use these keywords as identifiers. +Please not use these keywords as identifiers. If you really want to use these keywords in your iotdb path, please contact us. Review comment: done. 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 #1380: [IOTDB-722] support three consistency levels: strong, mid and weak
jt2594838 merged pull request #1380: URL: https://github.com/apache/incubator-iotdb/pull/1380 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] SilverNarcissus commented on pull request #1389: Fix spark tsfile master
SilverNarcissus commented on pull request #1389: URL: https://github.com/apache/incubator-iotdb/pull/1389#issuecomment-646381531 > Hi, bug fixing for version 0.10 needs to be merged to `rel/0.10`, and I'm afraid that you have to open another PR for `master` Sure~ I have 3 PR for 0.9.3, 0.10.0 and 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] SilverNarcissus opened a new pull request #1390: Fix spark tsfile bug
SilverNarcissus opened a new pull request #1390: URL: https://github.com/apache/incubator-iotdb/pull/1390 Only search measurements in required schema 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 #1369: add compression keyword
sonarcloud[bot] removed a comment on pull request #1369: URL: https://github.com/apache/incubator-iotdb/pull/1369#issuecomment-644672746 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1369) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1369&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1369&metric=new_duplicated_lines_density&view=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 #1369: add compression keyword
sonarcloud[bot] commented on pull request #1369: URL: https://github.com/apache/incubator-iotdb/pull/1369#issuecomment-646183798 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1369&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1369) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1369&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1369&metric=new_duplicated_lines_density&view=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 #1289: Add force stop storage engine interface
sonarcloud[bot] commented on pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#issuecomment-646152066 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=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 #1289: Add force stop storage engine interface
sonarcloud[bot] removed a comment on pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#issuecomment-645922524 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=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] SilverNarcissus opened a new pull request #1389: Fix spark tsfile 0.10.0
SilverNarcissus opened a new pull request #1389: URL: https://github.com/apache/incubator-iotdb/pull/1389 Only search those measurements in required schema 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] SilverNarcissus opened a new pull request #1388: Fix spark tsfile bug
SilverNarcissus opened a new pull request #1388: URL: https://github.com/apache/incubator-iotdb/pull/1388 Only search those measurements in required schema 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] HTHou commented on a change in pull request #1289: Add force stop storage engine interface
HTHou commented on a change in pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#discussion_r442277211 ## File path: server/src/main/java/org/apache/iotdb/db/service/RegisterManager.java ## @@ -64,4 +65,21 @@ public void deregisterAll() { iServices.clear(); logger.info("deregister all service."); } + + /** + * stop all service and clear iService list. + */ + public void shutdownAll() { +//we stop JMXServer at last +Collections.reverse(iServices); +for (IService service : iServices) { + try { +service.shutdown(1); + } catch (Exception e) { +logger.error("Failed to stop {} because:", service.getID().getName(), e); Review comment: Very good point! Thanks. 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] HTHou commented on a change in pull request #1289: Add force stop storage engine interface
HTHou commented on a change in pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#discussion_r442277211 ## File path: server/src/main/java/org/apache/iotdb/db/service/RegisterManager.java ## @@ -64,4 +65,21 @@ public void deregisterAll() { iServices.clear(); logger.info("deregister all service."); } + + /** + * stop all service and clear iService list. + */ + public void shutdownAll() { +//we stop JMXServer at last +Collections.reverse(iServices); +for (IService service : iServices) { + try { +service.shutdown(1); + } catch (Exception e) { +logger.error("Failed to stop {} because:", service.getID().getName(), e); Review comment: Very good point! Thanks. 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] HTHou commented on a change in pull request #1289: Add force stop storage engine interface
HTHou commented on a change in pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#discussion_r442257444 ## File path: server/src/test/java/org/apache/iotdb/db/integration/IoTDBRecoverUnclosedIT.java ## @@ -0,0 +1,267 @@ +/* + * 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.integration; + +import static org.apache.iotdb.db.constant.TestConstant.count; +import static org.apache.iotdb.db.constant.TestConstant.max_value; +import static org.apache.iotdb.db.constant.TestConstant.min_time; +import static org.apache.iotdb.db.constant.TestConstant.min_value; +import static org.junit.Assert.fail; + +import java.io.IOException; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Locale; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Config; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class IoTDBRecoverUnclosedIT { + + private static final String TIMESTAMP_STR = "Time"; + private static final String TEMPERATURE_STR = "root.ln.wf01.wt01.temperature"; + private static String[] creationSqls = new String[]{ + "SET STORAGE GROUP TO root.vehicle.d0", + "SET STORAGE GROUP TO root.vehicle.d1", + + "CREATE TIMESERIES root.vehicle.d0.s0 WITH DATATYPE=INT32, ENCODING=RLE", + "CREATE TIMESERIES root.vehicle.d0.s1 WITH DATATYPE=INT64, ENCODING=RLE", + "CREATE TIMESERIES root.vehicle.d0.s2 WITH DATATYPE=FLOAT, ENCODING=RLE", + "CREATE TIMESERIES root.vehicle.d0.s3 WITH DATATYPE=TEXT, ENCODING=PLAIN", + "CREATE TIMESERIES root.vehicle.d0.s4 WITH DATATYPE=BOOLEAN, ENCODING=PLAIN" + }; + private static String[] dataSet2 = new String[]{ + "SET STORAGE GROUP TO root.ln.wf01.wt01", + "CREATE TIMESERIES root.ln.wf01.wt01.status WITH DATATYPE=BOOLEAN, ENCODING=PLAIN", + "CREATE TIMESERIES root.ln.wf01.wt01.temperature WITH DATATYPE=FLOAT, ENCODING=PLAIN", + "CREATE TIMESERIES root.ln.wf01.wt01.hardware WITH DATATYPE=INT32, ENCODING=PLAIN", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(1, 1.1, false, 11)", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(2, 2.2, true, 22)", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(3, 3.3, false, 33 )", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(4, 4.4, false, 44)", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(5, 5.5, false, 55)" + }; + private final String d0s0 = "root.vehicle.d0.s0"; + private final String d0s1 = "root.vehicle.d0.s1"; + private final String d0s2 = "root.vehicle.d0.s2"; + private final String d0s3 = "root.vehicle.d0.s3"; + private String insertTemplate = "INSERT INTO root.vehicle.d0(timestamp,s0,s1,s2,s3,s4)" + + " VALUES(%d,%d,%d,%f,%s,%s)"; + + @Before + public void setUp() throws Exception { +EnvironmentUtils.closeStatMonitor(); + +EnvironmentUtils.envSetUp(); +Class.forName(Config.JDBC_DRIVER_NAME); +prepareData(); + } + + @After + public void tearDown() throws Exception { +EnvironmentUtils.cleanEnv(); + } + + @Test + public void test() throws SQLException, IOException, StartupException { +String[] retArray = new String[]{ +"0,2", +"0,4", +"0,3" +}; +try (Connection connection = DriverManager. +getConnection("jdbc:iotdb://127.0.0.1:6667/", "root", "root"); +Statement statement = connection.createStatement()) { + + boolean hasResultSet = statement.execute( + "select count(temperature) from root.ln.wf01.wt01 where time > 3"); + + Assert.assertTrue(hasResultSet); + int cnt; + try (ResultSet resultSet = statement.getResultSet();) { +cnt = 0; +while (resultSet.next()) { + String ans = resultSet.getString(
[GitHub] [incubator-iotdb] HTHou commented on a change in pull request #1289: Add force stop storage engine interface
HTHou commented on a change in pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#discussion_r442255865 ## File path: server/src/test/java/org/apache/iotdb/db/integration/IoTDBRecoverUnclosedIT.java ## @@ -0,0 +1,267 @@ +/* + * 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.integration; + +import static org.apache.iotdb.db.constant.TestConstant.count; +import static org.apache.iotdb.db.constant.TestConstant.max_value; +import static org.apache.iotdb.db.constant.TestConstant.min_time; +import static org.apache.iotdb.db.constant.TestConstant.min_value; +import static org.junit.Assert.fail; + +import java.io.IOException; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Locale; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Config; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class IoTDBRecoverUnclosedIT { + + private static final String TIMESTAMP_STR = "Time"; + private static final String TEMPERATURE_STR = "root.ln.wf01.wt01.temperature"; + private static String[] creationSqls = new String[]{ + "SET STORAGE GROUP TO root.vehicle.d0", + "SET STORAGE GROUP TO root.vehicle.d1", + + "CREATE TIMESERIES root.vehicle.d0.s0 WITH DATATYPE=INT32, ENCODING=RLE", + "CREATE TIMESERIES root.vehicle.d0.s1 WITH DATATYPE=INT64, ENCODING=RLE", + "CREATE TIMESERIES root.vehicle.d0.s2 WITH DATATYPE=FLOAT, ENCODING=RLE", + "CREATE TIMESERIES root.vehicle.d0.s3 WITH DATATYPE=TEXT, ENCODING=PLAIN", + "CREATE TIMESERIES root.vehicle.d0.s4 WITH DATATYPE=BOOLEAN, ENCODING=PLAIN" + }; + private static String[] dataSet2 = new String[]{ + "SET STORAGE GROUP TO root.ln.wf01.wt01", + "CREATE TIMESERIES root.ln.wf01.wt01.status WITH DATATYPE=BOOLEAN, ENCODING=PLAIN", + "CREATE TIMESERIES root.ln.wf01.wt01.temperature WITH DATATYPE=FLOAT, ENCODING=PLAIN", + "CREATE TIMESERIES root.ln.wf01.wt01.hardware WITH DATATYPE=INT32, ENCODING=PLAIN", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(1, 1.1, false, 11)", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(2, 2.2, true, 22)", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(3, 3.3, false, 33 )", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(4, 4.4, false, 44)", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(5, 5.5, false, 55)" + }; + private final String d0s0 = "root.vehicle.d0.s0"; + private final String d0s1 = "root.vehicle.d0.s1"; + private final String d0s2 = "root.vehicle.d0.s2"; + private final String d0s3 = "root.vehicle.d0.s3"; + private String insertTemplate = "INSERT INTO root.vehicle.d0(timestamp,s0,s1,s2,s3,s4)" + + " VALUES(%d,%d,%d,%f,%s,%s)"; + + @Before + public void setUp() throws Exception { +EnvironmentUtils.closeStatMonitor(); + +EnvironmentUtils.envSetUp(); +Class.forName(Config.JDBC_DRIVER_NAME); +prepareData(); + } + + @After + public void tearDown() throws Exception { +EnvironmentUtils.cleanEnv(); + } + + @Test + public void test() throws SQLException, IOException, StartupException { +String[] retArray = new String[]{ +"0,2", +"0,4", +"0,3" +}; +try (Connection connection = DriverManager. +getConnection("jdbc:iotdb://127.0.0.1:6667/", "root", "root"); +Statement statement = connection.createStatement()) { + + boolean hasResultSet = statement.execute( + "select count(temperature) from root.ln.wf01.wt01 where time > 3"); + + Assert.assertTrue(hasResultSet); + int cnt; + try (ResultSet resultSet = statement.getResultSet();) { +cnt = 0; +while (resultSet.next()) { + String ans = resultSet.getString(
[GitHub] [incubator-iotdb] HTHou commented on a change in pull request #1289: Add force stop storage engine interface
HTHou commented on a change in pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#discussion_r442233884 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java ## @@ -176,6 +176,7 @@ public synchronized void init() { try { tagLogFile = new TagLogFile(config.getSchemaDir(), MetadataConstant.TAG_LOG); + isRecovering = true; Review comment: Actually, when IoTDB close and restart using API, we don't get a new Instance of MManager. If we didn't set `isRecovering = true` here, the value of `isRecovering` would be null. 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] HTHou commented on a change in pull request #1289: Add force stop storage engine interface
HTHou commented on a change in pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#discussion_r442233884 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java ## @@ -176,6 +176,7 @@ public synchronized void init() { try { tagLogFile = new TagLogFile(config.getSchemaDir(), MetadataConstant.TAG_LOG); + isRecovering = true; Review comment: Actually, when close and restart the IoTDB using API, we don't get a new Instance of MManager. If I didn't set `isRecovering = true` here, the value of `isRecovering` would be null. 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] jixuan1989 merged pull request #1365: [IOTDB-761]cherry-picked from v0.10: flink-tsfile-connecto and flink-example dependency conflict: "Some Enforcer rules have failed. Loo
jixuan1989 merged pull request #1365: URL: https://github.com/apache/incubator-iotdb/pull/1365 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] JackieTien97 commented on a change in pull request #1289: Add force stop storage engine interface
JackieTien97 commented on a change in pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#discussion_r442168449 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java ## @@ -176,6 +176,7 @@ public synchronized void init() { try { tagLogFile = new TagLogFile(config.getSchemaDir(), MetadataConstant.TAG_LOG); + isRecovering = true; Review comment: Why we need to set it to true, it seems thats it has been set to true in the constructor of MMangaer. ## File path: server/src/test/java/org/apache/iotdb/db/integration/IoTDBRecoverUnclosedIT.java ## @@ -0,0 +1,267 @@ +/* + * 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.integration; + +import static org.apache.iotdb.db.constant.TestConstant.count; +import static org.apache.iotdb.db.constant.TestConstant.max_value; +import static org.apache.iotdb.db.constant.TestConstant.min_time; +import static org.apache.iotdb.db.constant.TestConstant.min_value; +import static org.junit.Assert.fail; + +import java.io.IOException; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Locale; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Config; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class IoTDBRecoverUnclosedIT { + + private static final String TIMESTAMP_STR = "Time"; + private static final String TEMPERATURE_STR = "root.ln.wf01.wt01.temperature"; + private static String[] creationSqls = new String[]{ + "SET STORAGE GROUP TO root.vehicle.d0", + "SET STORAGE GROUP TO root.vehicle.d1", + + "CREATE TIMESERIES root.vehicle.d0.s0 WITH DATATYPE=INT32, ENCODING=RLE", + "CREATE TIMESERIES root.vehicle.d0.s1 WITH DATATYPE=INT64, ENCODING=RLE", + "CREATE TIMESERIES root.vehicle.d0.s2 WITH DATATYPE=FLOAT, ENCODING=RLE", + "CREATE TIMESERIES root.vehicle.d0.s3 WITH DATATYPE=TEXT, ENCODING=PLAIN", + "CREATE TIMESERIES root.vehicle.d0.s4 WITH DATATYPE=BOOLEAN, ENCODING=PLAIN" + }; + private static String[] dataSet2 = new String[]{ + "SET STORAGE GROUP TO root.ln.wf01.wt01", + "CREATE TIMESERIES root.ln.wf01.wt01.status WITH DATATYPE=BOOLEAN, ENCODING=PLAIN", + "CREATE TIMESERIES root.ln.wf01.wt01.temperature WITH DATATYPE=FLOAT, ENCODING=PLAIN", + "CREATE TIMESERIES root.ln.wf01.wt01.hardware WITH DATATYPE=INT32, ENCODING=PLAIN", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(1, 1.1, false, 11)", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(2, 2.2, true, 22)", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(3, 3.3, false, 33 )", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(4, 4.4, false, 44)", + "INSERT INTO root.ln.wf01.wt01(timestamp,temperature,status, hardware) " + + "values(5, 5.5, false, 55)" + }; + private final String d0s0 = "root.vehicle.d0.s0"; + private final String d0s1 = "root.vehicle.d0.s1"; + private final String d0s2 = "root.vehicle.d0.s2"; + private final String d0s3 = "root.vehicle.d0.s3"; + private String insertTemplate = "INSERT INTO root.vehicle.d0(timestamp,s0,s1,s2,s3,s4)" + + " VALUES(%d,%d,%d,%f,%s,%s)"; + + @Before + public void setUp() throws Exception { +EnvironmentUtils.closeStatMonitor(); + +EnvironmentUtils.envSetUp(); +Class.forName(Config.JDBC_DRIVER_NAME); +prepareData(); + } + + @After + public void tearDown() throws Exception { +EnvironmentUtils.cleanEnv(); + } + + @Test + public void test() throws SQLException, IOException, StartupException { +String[] retArray = new String[]{ +"0,2", +"0,4", +"0,3" +}; +try (Connection connection = DriverManager. +getConnection("jdbc:iotdb://127.0.0.1:6667/", "root", "root");
[GitHub] [incubator-iotdb] jixuan1989 commented on pull request #1369: add compression keyword
jixuan1989 commented on pull request #1369: URL: https://github.com/apache/incubator-iotdb/pull/1369#issuecomment-645966192 pls solve the conflict. I concern is, we do not allow users to use keywords, but there are too many keywords... 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] jixuan1989 closed pull request #1369: add compression keyword
jixuan1989 closed pull request #1369: URL: https://github.com/apache/incubator-iotdb/pull/1369 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] jixuan1989 commented on a change in pull request #1369: add compression keyword
jixuan1989 commented on a change in pull request #1369: URL: https://github.com/apache/incubator-iotdb/pull/1369#discussion_r442167361 ## File path: docs/zh/UserGuide/Operation Manual/SQL Reference.md ## @@ -23,14 +23,12 @@ ## 关键字 -不要使用这些关键字作为标识符。 +不要使用这些关键字作为标识符。如果你真的想需要使用这些关键字在你的iotdb路径上,请联系我们。 Review comment: 不要使用这些关键字作为标识符。 如果有需求或者建议,可以在[issue](https://issues.apache.org/jira/projects/IOTDB/issues) 上提出。 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] jixuan1989 commented on a change in pull request #1369: add compression keyword
jixuan1989 commented on a change in pull request #1369: URL: https://github.com/apache/incubator-iotdb/pull/1369#discussion_r442167058 ## File path: docs/UserGuide/Operation Manual/SQL Reference.md ## @@ -32,14 +32,12 @@ All of these statements are write in IoTDB's own syntax, for details about the s ## Keywords -Please not use these keywords as identifiers. +Please not use these keywords as identifiers. If you really want to use these keywords in your iotdb path, please contact us. Review comment: this description is not suitable. ``` Do not use the following keywords as identifiers. You can open an [issue](https://issues.apache.org/jira/projects/IOTDB/issues) to provide new requirements or suggestions. ``` 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-645928919 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [5 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [7 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [125 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.1% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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-645749248 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [5 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [7 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [125 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.1% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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 #1289: Add force stop storage engine interface
sonarcloud[bot] commented on pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#issuecomment-645922524 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=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 #1289: Add force stop storage engine interface
sonarcloud[bot] removed a comment on pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#issuecomment-645868719 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=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 #1387: Create schema automatically
sonarcloud[bot] commented on pull request #1387: URL: https://github.com/apache/incubator-iotdb/pull/1387#issuecomment-645916156 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1387&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1387&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1387&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1387&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1387&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1387&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1387&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1387&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1387&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1387&resolved=false&types=CODE_SMELL) [12 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1387&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1387) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1387&metric=new_duplicated_lines_density&view=list) [9.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1387&metric=new_duplicated_lines_density&view=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] jixuan1989 commented on pull request #1384: [IOTDB-726] CheckPoint of MTree
jixuan1989 commented on pull request #1384: URL: https://github.com/apache/incubator-iotdb/pull/1384#issuecomment-645886001 is this design ...to simple? no snapshotted log data clean, serialize more and more large tree.. 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] jixuan1989 edited a comment on pull request #1384: [IOTDB-726] CheckPoint of MTree
jixuan1989 edited a comment on pull request #1384: URL: https://github.com/apache/incubator-iotdb/pull/1384#issuecomment-645886001 is this design ...too simple? no snapshotted log data clean, serialize more and more large tree.. 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] Ring-k opened a new pull request #1387: Create schema automatically
Ring-k opened a new pull request #1387: URL: https://github.com/apache/incubator-iotdb/pull/1387 This pull request implements schema automatic creation in distributed version. If an InsertPlan is executed but an exception is encountered because the storage group is not set yet, or the timeseries is not created, the MetaGroupMember will first execute a SetStorageGroupPlan, or CreateTimeseriesPlan, and then execute the InsertPlan again. These plans will be routed among the cluster, so that the corresponding nodes will be notified. 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] ppyu opened a new issue #1386: client-py存在问题
ppyu opened a new issue #1386: URL: https://github.com/apache/incubator-iotdb/issues/1386 利用python连接iotdb存在问题,利用 `pip install apache-iotdb`下载下来的与你们给出的demo版本不一致,缺失很多类。 通过手动编译最新代码并加入项目测试也存在如下图所示的问题。 ![image](https://user-images.githubusercontent.com/32732750/8560-7ed66280-b184-11ea-9005-c9ff4121dae3.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] removed a comment on pull request #1384: [IOTDB-726] CheckPoint of MTree
sonarcloud[bot] removed a comment on pull request #1384: URL: https://github.com/apache/incubator-iotdb/pull/1384#issuecomment-645295934 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1384) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1384&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1384&metric=new_duplicated_lines_density&view=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 #1384: [IOTDB-726] CheckPoint of MTree
sonarcloud[bot] commented on pull request #1384: URL: https://github.com/apache/incubator-iotdb/pull/1384#issuecomment-645879969 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1384&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1384) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1384&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1384&metric=new_duplicated_lines_density&view=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] samperson1997 commented on a change in pull request #1384: [IOTDB-726] CheckPoint of MTree
samperson1997 commented on a change in pull request #1384: URL: https://github.com/apache/incubator-iotdb/pull/1384#discussion_r442065024 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java ## @@ -899,6 +914,70 @@ private void findNodes(MNode node, String path, List res, int targetLeve } } + public int getSnapshotLineNumber() { +return snapshotLineNumber; + } + + public void serializeTo(String snapshotPath, int lineNumber) throws IOException { +try (BufferedWriter bw = new BufferedWriter( +new FileWriter(SystemFileFactory.INSTANCE.getFile(snapshotPath { + bw.write(String.valueOf(lineNumber)); + bw.newLine(); + root.serializeTo(bw); +} + } + + public static MTree deserializeFrom(String mtreeSnapshotPath) throws IOException { Review comment: Good point! 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 #1384: [IOTDB-726] CheckPoint of MTree
samperson1997 commented on a change in pull request #1384: URL: https://github.com/apache/incubator-iotdb/pull/1384#discussion_r442064151 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java ## @@ -899,6 +914,70 @@ private void findNodes(MNode node, String path, List res, int targetLeve } } + public int getSnapshotLineNumber() { +return snapshotLineNumber; + } + + public void serializeTo(String snapshotPath, int lineNumber) throws IOException { +try (BufferedWriter bw = new BufferedWriter( +new FileWriter(SystemFileFactory.INSTANCE.getFile(snapshotPath { + bw.write(String.valueOf(lineNumber)); + bw.newLine(); + root.serializeTo(bw); +} + } + + public static MTree deserializeFrom(String mtreeSnapshotPath) throws IOException { +File mtreeSnapshot = SystemFileFactory.INSTANCE.getFile(mtreeSnapshotPath); +if (!mtreeSnapshot.exists()) { + return new MTree(); +} + +try (BufferedReader br = new BufferedReader(new FileReader(mtreeSnapshot))) { + int snapshotLineNumber = Integer.parseInt(br.readLine()); + String s; + Deque nodeStack = new ArrayDeque<>(); + MNode node = null; + + while ((s = br.readLine()) != null) { +String[] nodeInfo = s.split(","); +short nodeType = Short.parseShort(nodeInfo[0]); +if (nodeType == MetadataConstant.STORAGE_GROUP_MNODE_TYPE) { + node = StorageGroupMNode.deserializeFrom(nodeInfo); +} else if (nodeType == MetadataConstant.MEASUREMENT_MNODE_TYPE) { + node = MeasurementMNode.deserializeFrom(nodeInfo); +} else { + node = new MNode(null, nodeInfo[1]); +} + +int childrenSize = Integer.parseInt(nodeInfo[nodeInfo.length - 1]); +if (childrenSize == 0) { + nodeStack.push(node); +} else { + Map childrenMap = new TreeMap<>(); 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 #1384: [IOTDB-726] CheckPoint of MTree
samperson1997 commented on a change in pull request #1384: URL: https://github.com/apache/incubator-iotdb/pull/1384#discussion_r442063447 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java ## @@ -199,11 +203,16 @@ public synchronized void init() { private void initFromLog(File logFile) throws IOException { // init the metadata from the operation log -mtree = new MTree(); +mtree = MTree.deserializeFrom(mtreeSnapshotPath); if (logFile.exists()) { try (FileReader fr = new FileReader(logFile); BufferedReader br = new BufferedReader(fr)) { String cmd; +int idx = 0; +while (idx <= mtree.getSnapshotLineNumber()) { 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 #1384: [IOTDB-726] CheckPoint of MTree
samperson1997 commented on a change in pull request #1384: URL: https://github.com/apache/incubator-iotdb/pull/1384#discussion_r442063302 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MLogWriter.java ## @@ -158,17 +149,23 @@ public static void upgradeMLog(String schemaDir, String logFileName) throws IOEx writer.write(buf.toString()); writer.newLine(); writer.flush(); - } } // upgrade finished, delete old mlog file if (!logFile.delete()) { throw new IOException("Deleting " + logFile + "failed."); } - + // rename tmpLogFile to mlog FSFactoryProducer.getFSFactory().moveFile(tmpLogFile, logFile); } - + + private int newLine() throws IOException { +writer.newLine(); +writer.flush(); + +// Every MTREE_SNAPSHOT_INTERVAL lines, create a checkpoint and save the MTree as a snapshot +return lineNumber++; 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 #1384: [IOTDB-726] CheckPoint of MTree
samperson1997 commented on a change in pull request #1384: URL: https://github.com/apache/incubator-iotdb/pull/1384#discussion_r442062310 ## File path: server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java ## @@ -568,11 +568,15 @@ private int primitiveArraySize = 64; /** - * whether enable data partition - * if disabled, all data belongs to partition 0 + * whether enable data partition if disabled, all data belongs to partition 0 Review comment: Sorry for the wrong format. 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 #1384: [IOTDB-726] CheckPoint of MTree
samperson1997 commented on a change in pull request #1384: URL: https://github.com/apache/incubator-iotdb/pull/1384#discussion_r442061273 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java ## @@ -72,27 +80,34 @@ public class MTree implements Serializable { private static final long serialVersionUID = -4200394435237291964L; + private MNode root; + private int snapshotLineNumber; Review comment: @qiaojialin the past participle of _snapshot_ is _snapshot_ ... When I changed it to _snapshoted_ or _snapshotted_, the IDE will just give a spelling error hint: ![image](https://user-images.githubusercontent.com/19167280/84997891-b1cb2700-b181-11ea-9153-263e396f44e4.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 #1289: Add force stop storage engine interface
sonarcloud[bot] commented on pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#issuecomment-645868719 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=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 #1289: Add force stop storage engine interface
sonarcloud[bot] removed a comment on pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#issuecomment-645854241 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=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] samperson1997 commented on a change in pull request #1384: [IOTDB-726] CheckPoint of MTree
samperson1997 commented on a change in pull request #1384: URL: https://github.com/apache/incubator-iotdb/pull/1384#discussion_r442057262 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java ## @@ -72,27 +80,34 @@ public class MTree implements Serializable { private static final long serialVersionUID = -4200394435237291964L; + private MNode root; + private int snapshotLineNumber; Review comment: I'll just take `snapshotedLineNumber` : ) 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 #1289: Add force stop storage engine interface
sonarcloud[bot] removed a comment on pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#issuecomment-645797738 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [3 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=list) [2.8% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=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 #1289: Add force stop storage engine interface
sonarcloud[bot] commented on pull request #1289: URL: https://github.com/apache/incubator-iotdb/pull/1289#issuecomment-645854241 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1289&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1289&metric=new_duplicated_lines_density&view=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] Alima777 commented on a change in pull request #1384: [IOTDB-726] CheckPoint of MTree
Alima777 commented on a change in pull request #1384: URL: https://github.com/apache/incubator-iotdb/pull/1384#discussion_r442035884 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java ## @@ -72,27 +80,34 @@ public class MTree implements Serializable { private static final long serialVersionUID = -4200394435237291964L; + private MNode root; + private int snapshotLineNumber; Review comment: Both are good for me. @samperson1997 think mine is better. :D 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 #1384: [IOTDB-726] CheckPoint of MTree
Alima777 commented on a change in pull request #1384: URL: https://github.com/apache/incubator-iotdb/pull/1384#discussion_r442033554 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java ## @@ -199,11 +203,16 @@ public synchronized void init() { private void initFromLog(File logFile) throws IOException { // init the metadata from the operation log -mtree = new MTree(); +mtree = MTree.deserializeFrom(mtreeSnapshotPath); if (logFile.exists()) { try (FileReader fr = new FileReader(logFile); BufferedReader br = new BufferedReader(fr)) { String cmd; +int idx = 0; +while (idx <= mtree.getSnapshotLineNumber()) { Review comment: Well, `return lineNumber++` above affects the logic here. Based on your suggection, it's `<` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org