deardeng commented on code in PR #68844:
URL: https://github.com/apache/doris/pull/68844#discussion_r4236870053
##########
fe/fe-core/src/main/java/org/apache/doris/clone/DynamicPartitionScheduler.java:
##########
@@ -787,13 +788,15 @@ public void executeDynamicPartition(Collection<Pair<Long,
Long>> dynamicPartitio
executeFirstTime);
}
clearDropPartitionFailedMsg(olapTable.getId());
- if (olapTable.getPartitionRetentionCount() > 0) {
- // Handle AUTO PARTITION cleanup based on
partition.retention_count
- dropPartitionOps = getDropPartitionOpForAutoPartition(db,
olapTable);
- } else {
- // Handle dynamic partition cleanup
- dropPartitionOps = getDropPartitionOpForDynamic(db,
olapTable, partitionColumn,
- partitionFormat);
+ if (!VariableMgr.isDynamicPartitionDropProtectionEnabled()) {
+ if (olapTable.getPartitionRetentionCount() > 0) {
+ // Handle AUTO PARTITION cleanup based on
partition.retention_count
+ dropPartitionOps =
getDropPartitionOpForAutoPartition(db, olapTable);
+ } else {
+ // Handle dynamic partition cleanup
+ dropPartitionOps = getDropPartitionOpForDynamic(db,
olapTable, partitionColumn,
+ partitionFormat);
+ }
Review Comment:
建议加个log啊,
有可能用户设置了,忘了关掉,导致过期partition 一直没删掉,log还看不出为啥
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]