HeimingZ commented on a change in pull request #5320:
URL: https://github.com/apache/iotdb/pull/5320#discussion_r841005119



##########
File path: 
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/VirtualStorageGroupProcessor.java
##########
@@ -522,17 +399,51 @@ private void recover() throws 
StorageGroupProcessorException {
 
       // split by partition so that we can find the last file of each 
partition and decide to
       // close it or not
-      RecoveryContext recoveryContext =
-          new RecoveryContext(tmpSeqTsFiles.size() + tmpUnseqTsFiles.size(), 
0);
+      VSGRecoveryContext VSGRecoveryContext =
+          new VSGRecoveryContext(tmpSeqTsFiles.size() + 
tmpUnseqTsFiles.size(), 0);
       Map<Long, List<TsFileResource>> partitionTmpSeqTsFiles =
           splitResourcesByPartition(tmpSeqTsFiles);
       Map<Long, List<TsFileResource>> partitionTmpUnseqTsFiles =
           splitResourcesByPartition(tmpUnseqTsFiles);
+      // recover unsealed TsFiles
+      List<WALRecoverListener> recoverListeners = new ArrayList<>();
       for (List<TsFileResource> value : partitionTmpSeqTsFiles.values()) {
-        recoverTsFiles(value, recoveryContext, true);
+        if (!value.isEmpty()) {
+          TsFileResource unsealedTsFileResource = value.get(value.size() - 1);

Review comment:
       Fixed, all TsFiles without resource file will be treated as unsealed.




-- 
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