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

hellostephen pushed a commit to branch tmp-17116
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/tmp-17116 by this push:
     new cb2448e9661 [opt][editlog] Added the ability to skip certain editlog 
exceptions w… (#54090)
cb2448e9661 is described below

commit cb2448e96617b4e6681ec14c07dc6c01c439a180
Author: deardeng <[email protected]>
AuthorDate: Fri Aug 22 21:55:19 2025 +0800

    [opt][editlog] Added the ability to skip certain editlog exceptions w… 
(#54090)
    
    …hen fe is abnormal
    
    The previous operation and maintenance method force_skip_journal_ids can
    only skip a specific logid. If there are many abnormal logids, it is
    difficult to configure
---
 .../src/main/java/org/apache/doris/common/Config.java    | 15 ++++++++++++++-
 .../src/main/java/org/apache/doris/persist/EditLog.java  | 16 ++++++++++++++--
 2 files changed, 28 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 509a82b5467..f3b738d4807 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
@@ -1277,6 +1277,19 @@ public class Config extends ConfigBase {
     @ConfField(mutable = true, masterOnly = true)
     public static boolean force_do_metadata_checkpoint = false;
 
+    /**
+     * If some joural is wrong, and FE can't start, we can use this to skip it.
+     */
+    @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
      */
@@ -2348,7 +2361,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 6f2068625bb..efdca96b50c 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
@@ -1258,8 +1258,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