You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/04/09 02:01:13 UTC

[doris] 10/12: [fix](bdbje) handle `RollbackException` in `BDBJEJournal.open` (#18471)

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

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 7356904a5000f1d9fef83f9fc7c27dabc3653ce2
Author: Lei Zhang <27...@users.noreply.github.com>
AuthorDate: Sat Apr 8 15:31:24 2023 +0800

    [fix](bdbje) handle `RollbackException` in `BDBJEJournal.open` (#18471)
    
    reference:
    
    handle bdb rollbackexception #6582
    [fix](bdbje) fix handle bdb RollbackException incorrectly #17483
---
 .../src/main/java/org/apache/doris/journal/bdbje/BDBJEJournal.java    | 4 ++++
 1 file changed, 4 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 d6bfb0ee9f..5376fd9547 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
@@ -341,6 +341,10 @@ public class BDBJEJournal implements Journal { // CHECKSTYLE IGNORE THIS LINE: B
                 break;
             } catch (InsufficientLogException insufficientLogEx) {
                 reSetupBdbEnvironment(insufficientLogEx);
+            } catch (RollbackException rollbackEx) {
+                LOG.warn("catch rollback log exception. will reopen the ReplicatedEnvironment.", rollbackEx);
+                bdbEnvironment.closeReplicatedEnvironment();
+                bdbEnvironment.openReplicatedEnvironment(new File(environmentPath));
             }
         }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org