You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/12/09 02:21:56 UTC

[GitHub] [iotdb] JackieTien97 commented on a change in pull request #4538: [To rel/0.12] [IOTDB-2123] Accelerate recovery process

JackieTien97 commented on a change in pull request #4538:
URL: https://github.com/apache/iotdb/pull/4538#discussion_r765385406



##########
File path: server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
##########
@@ -664,15 +665,15 @@ private void recoverTsFiles(List<TsFileResource> tsFiles, boolean isSeq) throws
                   + FILE_NAME_SEPARATOR,
               tsFileResource,
               isSeq,
-              i == tsFiles.size() - 1);
+              needsCheckTsFile);
 
       RestorableTsFileIOWriter writer = null;
       try {
         // this tsfile is not zero level, no need to perform redo wal
         if (TsFileResource.getMergeLevel(tsFileResource.getTsFile().getName()) > 0) {
           writer =
               recoverPerformer.recover(false, this::getWalDirectByteBuffer, this::releaseWalBuffer);
-          if (writer.hasCrashed()) {
+          if (writer != null && writer.hasCrashed()) {

Review comment:
       In merge task, even if the tsfileresource is complete, the tsfile may not finish ending.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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

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