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

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


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new 36425fcbe8a [fix](fe) Fix fe cannot start because npt in 
replayEraseTable (#30428)
36425fcbe8a is described below

commit 36425fcbe8aba620f03f018677bb77041f1f03be
Author: Lei Zhang <[email protected]>
AuthorDate: Fri Jan 26 16:50:15 2024 +0800

    [fix](fe) Fix fe cannot start because npt in replayEraseTable (#30428)
    
    * According to stack, we cannot find the root cause for reproducing
      the problem, the pr just bypass the problem to make fe start
    
    ```
    ERROR (stateListener|89) [EditLog.loadJournal():1102] Operation Type 15
    java.lang.NullPointerException: null
        at 
org.apache.doris.catalog.CatalogRecycleBin.replayEraseTable(CatalogRecycleBin.java:411)
 ~[doris-fe.jar:1.2-SNAPSHOT]
        at 
org.apache.doris.datasource.InternalCatalog.replayEraseTable(InternalCatalog.java:967)
 ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.Env.replayEraseTable(Env.java:3403) 
~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.persist.EditLog.loadJournal(EditLog.java:274) 
~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.Env.replayJournal(Env.java:2525) 
~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.Env.transferToMaster(Env.java:1329) 
~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.Env.access$1200(Env.java:278) 
~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.Env$4.runOneCycle(Env.java:2435) 
~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.common.util.Daemon.run(Daemon.java:116) 
~[doris-fe.jar:1.2-SNAPSHOT]
    ```
---
 .../src/main/java/org/apache/doris/catalog/CatalogRecycleBin.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/catalog/CatalogRecycleBin.java 
b/fe/fe-core/src/main/java/org/apache/doris/catalog/CatalogRecycleBin.java
index 50e0d788992..98033041621 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/CatalogRecycleBin.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/CatalogRecycleBin.java
@@ -407,7 +407,15 @@ public class CatalogRecycleBin extends MasterDaemon 
implements Writable {
         LOG.info("before replay erase table[{}]", tableId);
         RecycleTableInfo tableInfo = idToTable.remove(tableId);
         idToRecycleTime.remove(tableId);
+        if (tableInfo == null) {
+            LOG.warn("tableInfo {} is null, idToTable:{}", tableId, idToTable);
+            return;
+        }
         Table table = tableInfo.getTable();
+        if (table == null) {
+            LOG.warn("tableId {} is null, idToTable:{}", tableId, idToTable);
+            return;
+        }
         if (table.getType() == TableType.OLAP && !Env.isCheckpointThread()) {
             Env.getCurrentEnv().onEraseOlapTable((OlapTable) table, true);
         }


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

Reply via email to