qiaojialin commented on a change in pull request #258: [IOTDB-143]Development 
of merge
URL: https://github.com/apache/incubator-iotdb/pull/258#discussion_r313685171
 
 

 ##########
 File path: 
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
 ##########
 @@ -185,53 +204,95 @@ public StorageGroupProcessor(String systemInfoDir, 
String storageGroupName)
   private void recover() throws ProcessorException {
     logger.info("recover Storage Group  {}", storageGroupName);
 
-    // collect TsFiles from sequential data directory
-    List<File> tsFiles = 
getAllFiles(DirectoryManager.getInstance().getAllSequenceFileFolders());
-    recoverSeqFiles(tsFiles);
-
-    // collect TsFiles from unsequential data directory
-    tsFiles = 
getAllFiles(DirectoryManager.getInstance().getAllUnSequenceFileFolders());
-    recoverUnseqFiles(tsFiles);
+    try {
+      // collect TsFiles from sequential and unsequential data directory
+      List<TsFileResource> seqTsFiles = 
getAllFiles(DirectoryManager.getInstance().getAllSequenceFileFolders());
+      List<TsFileResource> unseqTsFiles =
+          
getAllFiles(DirectoryManager.getInstance().getAllUnSequenceFileFolders());
+
+      recoverSeqFiles(seqTsFiles);
+      recoverUnseqFiles(unseqTsFiles);
+
+      String taskName = storageGroupName + "-" + System.currentTimeMillis();
+      File mergingMods = new File(storageGroupSysDir, 
MERGING_MODIFICAITON_FILE_NAME);
+      if (mergingMods.exists()) {
+        mergingModification = new ModificationFile(storageGroupSysDir + 
File.separator + MERGING_MODIFICAITON_FILE_NAME);
 
 Review comment:
   How about changing the type of parameter from String to FIle?

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


With regards,
Apache Git Services

Reply via email to