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

morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new de7183a04c7 branch-3.1: [opt][editlog] Added the ability to skip 
certain editlog exceptions when fe is abnormal #54090 (#55204)
de7183a04c7 is described below

commit de7183a04c7961d02cf4512431b16861f7d7c867
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Sep 4 09:51:11 2025 +0800

    branch-3.1: [opt][editlog] Added the ability to skip certain editlog 
exceptions when fe is abnormal #54090 (#55204)
    
    Cherry-picked from #54090
    
    Co-authored-by: deardeng <[email protected]>
---
 .../src/main/java/org/apache/doris/common/Config.java    |  9 ++++++++-
 .../src/main/java/org/apache/doris/persist/EditLog.java  | 16 ++++++++++++++--
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java 
b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java
index 12038c66c70..26fe184f6ff 100644
--- a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java
+++ b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java
@@ -1268,6 +1268,13 @@ public class Config extends ConfigBase {
     @ConfField(mutable = false, masterOnly = false)
     public static String[] force_skip_journal_ids = {};
 
+    @ConfField(description = {"当回放 editlog 时遇到特定操作类型的异常导致 FE 无法启动时,可以配置需要忽略的 
editlog 操作类型枚举值,"
+            + "从而跳过这些异常,让 replay 线程可以继续回放其他日志",
+        "When replaying editlog encounters exceptions with specific operation 
types that prevent FE from starting, "
+            + "you can configure the editlog operation type enum values to be 
ignored, "
+            + "thereby skipping these exceptions and allowing the replay 
thread to continue replaying other logs"})
+    public static short[] skip_operation_types_on_replay_exception =  {-1, -1};
+
     /**
      * Decide how often to check dynamic partition
      */
@@ -2418,7 +2425,7 @@ public class Config extends ConfigBase {
     /**
      * To prevent different types (V1, V2, V3) of behavioral inconsistencies,
      * we may delete the DecimalV2 and DateV1 types in the future.
-     * At this stage, we use ‘disable_decimalv2’ and ‘disable_datev1’
+     * At this stage, we use 'disable_decimalv2' and 'disable_datev1'
      * to determine whether these two types take effect.
      */
     @ConfField(mutable = true)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java 
b/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java
index b7f73831b6d..b80a084c33f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java
@@ -1435,8 +1435,20 @@ public class EditLog {
              */
             LOG.warn("[INCONSISTENT META] replay log {} failed, journal {}: 
{}", logId, journal, e.getMessage(), e);
         } catch (Exception e) {
-            LOG.error("replay Operation Type {}, log id: {}", opCode, logId, 
e);
-            System.exit(-1);
+            short[] ignoreExceptionLogIds = 
Config.skip_operation_types_on_replay_exception;
+            boolean skip = false;
+            for (short ignoreLogId : ignoreExceptionLogIds) {
+                if (ignoreLogId == opCode) {
+                    skip = true;
+                    break;
+                }
+            }
+            if (!skip) {
+                LOG.error("replay Operation Type {}, log id: {}", opCode, 
logId, e);
+                System.exit(-1);
+            } else {
+                LOG.warn("Skip replay Operation Type {} due to exception, log 
id: {}", opCode, logId, e);
+            }
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to