Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

wyxxxcat
Copy link
Contributor

@wyxxxcat wyxxxcat commented Nov 7, 2024

pick #39781

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@wyxxxcat
Copy link
Contributor Author

wyxxxcat commented Nov 7, 2024

run buildall

@wyxxxcat
Copy link
Contributor Author

wyxxxcat commented Nov 9, 2024

run buildall

Comment on lines +2062 to +2074
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);
Copy link
Contributor

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);
Copy link
Contributor

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.

Comment on lines +925 to +928
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);
Copy link
Contributor

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 {
Copy link
Contributor

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

@w41ter
Copy link
Contributor

w41ter commented Nov 20, 2024

close in favor #44112

@w41ter w41ter closed this Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants