[fix](dynamic partition) fix create dynamic partition with overlap not throw exception #37924 (#37964)

cherry-pick:  #37924
This commit is contained in:
yujun
2024-07-17 19:13:35 +08:00
committed by GitHub
parent 4d359cd946
commit 7180290d68
2 changed files with 28 additions and 4 deletions

View File

@ -278,9 +278,11 @@ public class DynamicPartitionScheduler extends MasterDaemon {
// IllegalArgumentException: lb is greater than ub
LOG.warn("Error in gen addPartitionKeyRange. db: {}, table: {}, partition idx: {}",
db.getFullName(), olapTable.getName(), idx, e);
recordCreatePartitionFailedMsg(db.getFullName(), olapTable.getName(),
e.getMessage(), olapTable.getId());
throw new DdlException(e.getMessage());
if (executeFirstTime) {
throw new DdlException("maybe dynamic_partition.start is too small, error: "
+ e.getMessage());
}
continue;
}
for (PartitionItem partitionItem : rangePartitionInfo.getIdToItem(false).values()) {
// only support single column partition now
@ -299,7 +301,6 @@ public class DynamicPartitionScheduler extends MasterDaemon {
addPartitionKeyRange, db.getFullName(), olapTable.getName(), idx, e);
recordCreatePartitionFailedMsg(db.getFullName(), olapTable.getName(),
e.getMessage(), olapTable.getId());
throw new DdlException(e.getMessage());
}
break;
}