You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/03/07 08:20:05 UTC
(doris) 32/38: [bug](meta) exit when get RollbackException in observer (#31687)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 2f012b834d9482b77d26d84fb49f38551e4581dc
Author: Lijia Liu <li...@yeah.net>
AuthorDate: Thu Mar 7 12:18:21 2024 +0800
[bug](meta) exit when get RollbackException in observer (#31687)
---
.../src/main/java/org/apache/doris/journal/bdbje/BDBJEJournal.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/journal/bdbje/BDBJEJournal.java b/fe/fe-core/src/main/java/org/apache/doris/journal/bdbje/BDBJEJournal.java
index e00288eac55..13fa926c06d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/journal/bdbje/BDBJEJournal.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/journal/bdbje/BDBJEJournal.java
@@ -662,6 +662,13 @@ public class BDBJEJournal implements Journal { // CHECKSTYLE IGNORE THIS LINE: B
}
} catch (RollbackException rollbackEx) {
if (!Env.isCheckpointThread()) {
+ // Because Doris FE can not rollback its edit log, so it should restart and replay the new master's
+ // edit log.
+ if (rollbackEx.getEarliestTransactionId() != 0) {
+ LOG.error("Catch rollback log exception and it may have replayed outdated "
+ + "logs, so exec System.exit(-1).", rollbackEx);
+ System.exit(-1);
+ }
LOG.warn("catch rollback log exception. will reopen the ReplicatedEnvironment.", rollbackEx);
bdbEnvironment.close();
bdbEnvironment.openReplicatedEnvironment(new File(environmentPath));
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org