This is an automated email from the ASF dual-hosted git repository. lide pushed a commit to branch branch-1.1-lts in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.1-lts by this push: new 02b54aeb7d [fix](restore) fix bug when replay restore with reserve dynamic partition cause OBSERVER down (#17327) 02b54aeb7d is described below commit 02b54aeb7d93ae31b07d5ceb01c03b7d793bf4aa Author: xueweizhang <zxw520bl...@163.com> AuthorDate: Fri Mar 24 16:13:51 2023 +0800 [fix](restore) fix bug when replay restore with reserve dynamic partition cause OBSERVER down (#17327) ehen replay restore a table with reserve_dynamic_partition_enable=true, must registerOrRemoveDynamicPartitionTable with isReplay=true, or maybe cause OBSERVER can not replay restore auditlog success. Signed-off-by: nextdreamblue <zxw520bl...@163.com> --- fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java b/fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java index fd3194c08f..9fd63d4f67 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java +++ b/fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java @@ -1452,7 +1452,7 @@ public class RestoreJob extends AbstractJob { // set all restored partition version and version hash // set all tables' state to NORMAL - setTableStateToNormal(db, true); + setTableStateToNormal(db, true, isReplay); for (long tblId : restoredVersionInfo.rowKeySet()) { Table tbl = db.getTableNullable(tblId); if (tbl == null) { @@ -1620,7 +1620,7 @@ public class RestoreJob extends AbstractJob { Database db = catalog.getDbNullable(dbId); if (db != null) { // rollback table's state to NORMAL - setTableStateToNormal(db, false); + setTableStateToNormal(db, false, isReplay); // remove restored tbls for (Table restoreTbl : restoredTbls) { @@ -1697,7 +1697,7 @@ public class RestoreJob extends AbstractJob { LOG.info("finished to cancel restore job. is replay: {}. {}", isReplay, this); } - private void setTableStateToNormal(Database db, boolean committed) { + private void setTableStateToNormal(Database db, boolean committed, boolean isReplay) { for (String tableName : jobInfo.backupOlapTableObjects.keySet()) { Table tbl = db.getTableNullable(jobInfo.getAliasByOriginNameIfSet(tableName)); if (tbl == null) { @@ -1731,7 +1731,7 @@ public class RestoreJob extends AbstractJob { } if (committed && reserveDynamicPartitionEnable) { if (DynamicPartitionUtil.isDynamicPartitionTable(tbl)) { - DynamicPartitionUtil.registerOrRemoveDynamicPartitionTable(db.getId(), olapTbl, false); + DynamicPartitionUtil.registerOrRemoveDynamicPartitionTable(db.getId(), olapTbl, isReplay); catalog.getDynamicPartitionScheduler().createOrUpdateRuntimeInfo(tbl.getId(), DynamicPartitionScheduler.LAST_UPDATE_TIME, TimeUtils.getCurrentFormatTime()); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org