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 2019/11/04 03:29:44 UTC

[GitHub] [incubator-iotdb] jt2594838 commented on a change in pull request #515: [IOTDB-273] parallel recovery

jt2594838 commented on a change in pull request #515: [IOTDB-273] parallel recovery
URL: https://github.com/apache/incubator-iotdb/pull/515#discussion_r341896068
 
 

 ##########
 File path: server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java
 ##########
 @@ -97,25 +106,34 @@ private StorageEngine() {
     /*
      * recover all storage group processors.
      */
-    try {
-      List<MNode> sgNodes = MManager.getInstance().getAllStorageGroups();
-      for (MNode storageGroup : sgNodes) {
-        StorageGroupProcessor processor = new StorageGroupProcessor(systemDir, storageGroup.getFullPath());
-        processor.setDataTTL(storageGroup.getDataTTL());
-        logger.info("Storage Group Processor {} is recovered successfully", storageGroup.getFullPath());
-        processorMap.put(storageGroup.getFullPath(), processor);
+    List<MNode> sgNodes = MManager.getInstance().getAllStorageGroups();
+    List<Future> futures = new ArrayList<>();
+    for (MNode storageGroup : sgNodes) {
+      futures.add(recoveryThreadPool.submit(() -> {
+        try {
+          StorageGroupProcessor processor = new StorageGroupProcessor(systemDir,storageGroup.getFullPath());
+          processor.setDataTTL(storageGroup.getDataTTL());
+          processorMap.put(storageGroup.getFullPath(), processor);
+          logger.info("Storage Group Processor {} is recovered successfully",storageGroup.getFullPath());
+        } catch (ProcessorException e) {
+          logger.error("Storage Group Processor {} is recovered failed!",storageGroup.getFullPath(), e);
 
 Review comment:
   is recovered failed -> failed to recover

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