-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[branch-2.0](binlog) Support drop view binlog (#39781) #43408
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
465d23f
to
4386cfd
Compare
4386cfd
to
d5b5fc0
Compare
run buildall |
BackupOlapTableInfo backupTableInfo = jobInfo.backupOlapTableObjects.get(tableName); | ||
if (tableType != TableType.OLAP && tableType != TableType.ODBC && tableType != TableType.VIEW) { | ||
continue; | ||
} | ||
if (tableType == TableType.OLAP && backupTableInfo != null) { | ||
// drop the non restored partitions. | ||
dropNonRestoredPartitions(db, (OlapTable) table, backupTableInfo); | ||
} else if (isCleanTables) { | ||
// otherwise drop the entire table. | ||
LOG.info("drop non restored table {}({}). {}", tableName, tableId, this); | ||
boolean isView = false; | ||
boolean isForceDrop = false; // move this table into recyclebin. | ||
env.getInternalCatalog().dropTableWithoutCheck(db, table, isView, isForceDrop); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wyxxxcat This patch is staled, please update.
@@ -916,23 +916,26 @@ public void dropTable(DropTableStmt stmt) throws DdlException { | |||
} | |||
} | |||
|
|||
dropTableInternal(db, table, stmt.isForceDrop()); | |||
dropTableInternal(db, table, stmt.isView(), stmt.isForceDrop(), watch, costTimes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only pick the necessary parameters.
watch.stop(); | ||
costTimes.put("6:total", watch.getTime()); | ||
LOG.info("finished dropping table: {} from db: {}, is view: {}, is force: {}, cost: {}", | ||
tableName, dbName, stmt.isView(), stmt.isForceDrop(), costTimes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should merge this conflict manually, eg:
LOG.info("finished dropping table: {} from db: {}, is force: {}, is view: {}", tableName, dbName, stmt.isForceDrop(), stmt.isView());
@@ -942,7 +945,8 @@ public void dropTableWithoutCheck(Database db, Table table, boolean forceDrop) t | |||
} | |||
|
|||
// Drop a table, the db lock must hold. | |||
private void dropTableInternal(Database db, Table table, boolean forceDrop) throws DdlException { | |||
private void dropTableInternal(Database db, Table table, boolean isView, boolean forceDrop, | |||
StopWatch watch, Map<String, Long> costTimes) throws DdlException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove StopWatch watch, Map<String, Long> costTimes
close in favor #44112 |
pick #39781