You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/02/10 13:20:06 UTC

[GitHub] [incubator-iotdb] EJTTianYu opened a new pull request #784: fix IllegalArgumentException when there exists 0 byte TsFile

EJTTianYu opened a new pull request #784: fix IllegalArgumentException when there exists 0 byte TsFile
URL: https://github.com/apache/incubator-iotdb/pull/784
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] jixuan1989 commented on a change in pull request #784: [IOTDB-470]fix IllegalArgumentException when there exists 0 byte TsFile

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on a change in pull request #784: [IOTDB-470]fix IllegalArgumentException when there exists 0 byte TsFile
URL: https://github.com/apache/incubator-iotdb/pull/784#discussion_r377477739
 
 

 ##########
 File path: server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
 ##########
 @@ -265,9 +265,17 @@ private void recover() throws StorageGroupProcessorException {
       recoverUnseqFiles(unseqTsFiles);
 
       for (TsFileResource resource : seqTsFiles) {
+        //After recover, case the TsFile's length is equal to 0, delete both the TsFileResource and the file itself
+        if (resource.getFile().length() == 0) {
+          deleteTsfile(resource.getFile());
 
 Review comment:
   resource.remove() seems better.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] EJTTianYu commented on a change in pull request #784: [IOTDB-470]fix IllegalArgumentException when there exists 0 byte TsFile

Posted by GitBox <gi...@apache.org>.
EJTTianYu commented on a change in pull request #784: [IOTDB-470]fix IllegalArgumentException when there exists 0 byte TsFile
URL: https://github.com/apache/incubator-iotdb/pull/784#discussion_r377480061
 
 

 ##########
 File path: server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
 ##########
 @@ -265,9 +265,17 @@ private void recover() throws StorageGroupProcessorException {
       recoverUnseqFiles(unseqTsFiles);
 
       for (TsFileResource resource : seqTsFiles) {
+        //After recover, case the TsFile's length is equal to 0, delete both the TsFileResource and the file itself
+        if (resource.getFile().length() == 0) {
+          deleteTsfile(resource.getFile());
 
 Review comment:
   it seems that resource.remove() just removes the related file, while deleteTsFile method could also remove the TsFileResource from sequenceFileList/unSequenceFileList.
   Does we need to reserve the TsFileResource when the TsFile is 0 byte length

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] qiaojialin commented on a change in pull request #784: [IOTDB-470]fix IllegalArgumentException when there exists 0 byte TsFile

Posted by GitBox <gi...@apache.org>.
qiaojialin commented on a change in pull request #784: [IOTDB-470]fix IllegalArgumentException when there exists 0 byte TsFile
URL: https://github.com/apache/incubator-iotdb/pull/784#discussion_r377492491
 
 

 ##########
 File path: server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
 ##########
 @@ -265,9 +265,17 @@ private void recover() throws StorageGroupProcessorException {
       recoverUnseqFiles(unseqTsFiles);
 
       for (TsFileResource resource : seqTsFiles) {
+        //After recover, case the TsFile's length is equal to 0, delete both the TsFileResource and the file itself
+        if (resource.getFile().length() == 0) {
+          deleteTsfile(resource.getFile());
 
 Review comment:
   If the tsfile length is 0. the resource should be removed from the resourceList, otherwise exception may occur in the query process

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] jixuan1989 merged pull request #784: [IOTDB-470]fix IllegalArgumentException when there exists 0 byte TsFile

Posted by GitBox <gi...@apache.org>.
jixuan1989 merged pull request #784: [IOTDB-470]fix IllegalArgumentException when there exists 0 byte TsFile
URL: https://github.com/apache/incubator-iotdb/pull/784
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] EJTTianYu commented on a change in pull request #784: [IOTDB-470]fix IllegalArgumentException when there exists 0 byte TsFile

Posted by GitBox <gi...@apache.org>.
EJTTianYu commented on a change in pull request #784: [IOTDB-470]fix IllegalArgumentException when there exists 0 byte TsFile
URL: https://github.com/apache/incubator-iotdb/pull/784#discussion_r377480061
 
 

 ##########
 File path: server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
 ##########
 @@ -265,9 +265,17 @@ private void recover() throws StorageGroupProcessorException {
       recoverUnseqFiles(unseqTsFiles);
 
       for (TsFileResource resource : seqTsFiles) {
+        //After recover, case the TsFile's length is equal to 0, delete both the TsFileResource and the file itself
+        if (resource.getFile().length() == 0) {
+          deleteTsfile(resource.getFile());
 
 Review comment:
   it seems that resource.remove() just remove the related file, while deleteTsFile method could also remove the TsFileResource from sequenceFileList/unSequenceFileList.
   Does we need to reserve the TsFileResource when the TsFile is 0 byte length

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services