This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push: new 036276c1d3 [fix] Do not send drop task when replay drop table (#10062) 036276c1d3 is described below commit 036276c1d3ff71d60c9fc6fe85becae5427023a6 Author: Lijia Liu <liutang...@yeah.net> AuthorDate: Sun Jun 12 09:59:38 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. --- .../src/main/java/org/apache/doris/catalog/CatalogRecycleBin.java | 8 ++++---- .../main/java/org/apache/doris/datasource/InternalDataSource.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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 bbaaeab465..a9c78d5705 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 @@ -87,14 +87,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); @@ -196,7 +196,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(); @@ -208,7 +208,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(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalDataSource.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalDataSource.java index 7068cd92d9..8395ebbd63 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalDataSource.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalDataSource.java @@ -923,7 +923,7 @@ public class InternalDataSource implements DataSourceIf { 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); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org