This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a commit to branch enhance_wal
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit 8c6166ade5e47e4cf733ea278435eda00b17fb97
Author: qiaojialin <[email protected]>
AuthorDate: Fri May 29 17:27:00 2020 +0800

    enhance wal
---
 .../iotdb/db/writelog/recover/LogReplayer.java     | 28 ++++++++++++----------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git 
a/server/src/main/java/org/apache/iotdb/db/writelog/recover/LogReplayer.java 
b/server/src/main/java/org/apache/iotdb/db/writelog/recover/LogReplayer.java
index 9ad8fbf..d9dfcd3 100644
--- a/server/src/main/java/org/apache/iotdb/db/writelog/recover/LogReplayer.java
+++ b/server/src/main/java/org/apache/iotdb/db/writelog/recover/LogReplayer.java
@@ -82,26 +82,30 @@ public class LogReplayer {
    * finds the logNode of the TsFile given by insertFilePath and 
logNodePrefix, reads the WALs from
    * the logNode and redoes them into a given MemTable and ModificationFile.
    */
-  public void replayLogs() throws StorageGroupProcessorException {
+  public void replayLogs() {
     WriteLogNode logNode = MultiFileLogNodeManager.getInstance().getNode(
         logNodePrefix + 
FSFactoryProducer.getFSFactory().getFile(insertFilePath).getName());
 
     ILogReader logReader = logNode.getLogReader();
     try {
       while (logReader.hasNext()) {
-        PhysicalPlan plan = logReader.next();
-        if (plan instanceof InsertPlan) {
-          replayInsert((InsertPlan) plan);
-        } else if (plan instanceof DeletePlan) {
-          replayDelete((DeletePlan) plan);
-        } else if (plan instanceof UpdatePlan) {
-          replayUpdate((UpdatePlan) plan);
-        } else if (plan instanceof InsertTabletPlan) {
-          replayBatchInsert((InsertTabletPlan) plan);
+        try {
+          PhysicalPlan plan = logReader.next();
+          if (plan instanceof InsertPlan) {
+            replayInsert((InsertPlan) plan);
+          } else if (plan instanceof DeletePlan) {
+            replayDelete((DeletePlan) plan);
+          } else if (plan instanceof UpdatePlan) {
+            replayUpdate((UpdatePlan) plan);
+          } else if (plan instanceof InsertTabletPlan) {
+            replayBatchInsert((InsertTabletPlan) plan);
+          }
+        } catch (Exception e) {
+          logger.error("recover wal of {} failed", insertFilePath, e);
         }
       }
-    } catch (IOException | WriteProcessException | QueryProcessException e) {
-      throw new StorageGroupProcessorException(e);
+    } catch (IOException e) {
+      logger.error("meet error when redo wal of {}", insertFilePath, e);
     } finally {
       logReader.close();
       try {

Reply via email to