yujun777 commented on code in PR #31125: URL: https://github.com/apache/doris/pull/31125#discussion_r1495213157
########## fe/fe-core/src/main/java/org/apache/doris/catalog/CatalogRecycleBin.java: ########## @@ -811,18 +810,18 @@ public synchronized void recoverPartition(long dbId, OlapTable table, String par throw new DdlException("Can not recover partition[" + partitionName + "]. Partition item conflict."); } - // recover partition + // check if partition name exists Partition recoverPartition = recoverPartitionInfo.getPartition(); Preconditions.checkState(recoverPartition.getName().equalsIgnoreCase(partitionName)); if (!Strings.isNullOrEmpty(newPartitionName)) { if (table.checkPartitionNameExist(newPartitionName)) { throw new DdlException("Partition name[" + newPartitionName + "] is already used"); } + recoverPartition.setName(newPartitionName); Review Comment: before set new name, check if table contains other partition with the same old partition name. if not contains old partition name, remove old partition name from table's nameToPartition ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org