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



##########
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:
       Fixed by #4546 




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to