This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch dev-1.0.1 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/dev-1.0.1 by this push: new e11e7be26d [fix] Do not send drop task when replay drop table (#10062) e11e7be26d is described below commit e11e7be26d20f5b2663c23baf15dc0c49fc4a6dd Author: morningman <morning...@163.com> AuthorDate: Sun Jun 12 14:00:13 2022 +0800 [fix] Do not send drop task when replay drop table (#10062) When doing checkpoint, FE will sends DropTask to BE. This PR prohibit this conduct. --- fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java | 2 +- .../src/main/java/org/apache/doris/catalog/CatalogRecycleBin.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java index 7685327ef1..22e532f78f 100755 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java @@ -4671,7 +4671,7 @@ public class Catalog { db.dropTable(table.getName()); if (!isForceDrop) { - Catalog.getCurrentRecycleBin().recycleTable(db.getId(), table); + Catalog.getCurrentRecycleBin().recycleTable(db.getId(), table, isReplay); } else { if (table.getType() == TableType.OLAP) { Catalog.getCurrentCatalog().onEraseOlapTable((OlapTable) table, isReplay); 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 98b1b741a1..1fbc2d2f43 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 @@ -88,14 +88,14 @@ public class CatalogRecycleBin extends MasterDaemon implements Writable { return true; } - public synchronized boolean recycleTable(long dbId, Table table) { + public synchronized boolean recycleTable(long dbId, Table table, boolean isReplay) { if (idToTable.containsKey(table.getId())) { LOG.error("table[{}] already in recycle bin.", table.getId()); return false; } // erase table with same name - eraseTableWithSameName(dbId, table.getName()); + eraseTableWithSameName(dbId, table.getName(), isReplay); // recycle table RecycleTableInfo tableInfo = new RecycleTableInfo(dbId, table); @@ -197,7 +197,7 @@ public class CatalogRecycleBin extends MasterDaemon implements Writable { } // end for tables } - private synchronized void eraseTableWithSameName(long dbId, String tableName) { + private synchronized void eraseTableWithSameName(long dbId, String tableName, boolean isReplay) { Iterator<Map.Entry<Long, RecycleTableInfo>> iterator = idToTable.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<Long, RecycleTableInfo> entry = iterator.next(); @@ -209,7 +209,7 @@ public class CatalogRecycleBin extends MasterDaemon implements Writable { Table table = tableInfo.getTable(); if (table.getName().equals(tableName)) { if (table.getType() == TableType.OLAP) { - Catalog.getCurrentCatalog().onEraseOlapTable((OlapTable) table, false); + Catalog.getCurrentCatalog().onEraseOlapTable((OlapTable) table, isReplay); } iterator.remove(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org