Vallishp commented on code in PR #43107: URL: https://github.com/apache/doris/pull/43107#discussion_r1835940130
########## fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java: ########## @@ -1196,6 +1196,75 @@ public Partition dropPartition(long dbId, String partitionName, boolean isForceD return dropPartition(dbId, partitionName, isForceDrop, !isForceDrop); } + public Partition dropPartitionForTruncate(long dbId, boolean isForceDrop, + RecyclePartitionParam recyclePartitionParam) { + // 1. If "isForceDrop" is false, the partition will be added to the Catalog Recyle bin, and all tablets of this + // partition will not be deleted. + // 2. If "ifForceDrop" is true, the partition will be dropped immediately + Partition partition = recyclePartitionParam.partition; + if (partition != null) { + idToPartition.remove(partition.getId()); Review Comment: replacePartition had already removed old partition from nameToPartition and added new partition created by truncate process. so it should not be called in truncate process. -- 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