From 325504deebf21e1fc3fb80be828ae85fdfcff43c Mon Sep 17 00:00:00 2001 From: yiguolei <676222867@qq.com> Date: Wed, 28 Jun 2023 19:56:17 +0800 Subject: [PATCH] [bugfix](recover) do not need dynamic partition recover except olap table (#21290) introduced by #19031 FE could not recover any more because there is a convert to olap table operation in the code. But there are many table types that is not a olap table such as view jdbc table ... It will convert failed and FE will not start correctly.Co-authored-by: yiguolei --- .../java/org/apache/doris/catalog/CatalogRecycleBin.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 d05e61ff01..e6e8850a9a 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 @@ -697,7 +697,10 @@ public class CatalogRecycleBin extends MasterDaemon implements Writable { RecoverInfo recoverInfo = new RecoverInfo(db.getId(), table.getId(), -1L, "", newTableName, ""); Env.getCurrentEnv().getEditLog().logRecoverTable(recoverInfo); } - DynamicPartitionUtil.registerOrRemoveDynamicPartitionTable(db.getId(), (OlapTable) table, isReplay); + // Only olap table need recover dynamic partition, other table like jdbc odbc view.. do not need it + if (table.getType() == TableType.OLAP) { + DynamicPartitionUtil.registerOrRemoveDynamicPartitionTable(db.getId(), (OlapTable) table, isReplay); + } } finally { table.writeUnlock(); }