-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](dynamic partition) drop partition exclude history_partition_num #37539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix](dynamic partition) drop partition exclude history_partition_num #37539
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
|
need re-format FE |
|
run buildall |
TPC-H: Total hot run time: 39675 ms |
TPC-DS: Total hot run time: 174239 ms |
ClickBench: Total hot run time: 30.34 s |
|
run external |
|
run p1 |
|
run cloud_p1 |
|
run p0 |
1 similar comment
|
run p0 |
deardeng
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by anyone and no changes requested. |
|
run p1 |
|
run cloud_p1 |
|
run external |
dataroaring
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
run buildall |
862d9c7 to
86af736
Compare
|
run buildall |
TPC-H: Total hot run time: 39415 ms |
TPC-DS: Total hot run time: 173448 ms |
dataroaring
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
ClickBench: Total hot run time: 30.38 s |
…#37539) FIX: When dropping dynamic partition, PR #35778 will use math.max(start, -history_partition_num) as the first partition, but it may delete users' partitions if they specify both start and history_partition_num inappropriately. For safety reason, revert this behavious changed, only use start as the first partition when dropping partitions. For those who had specified a very small start value, drop partitions will catch an exception , and stop dropping this table's partition and then record this error in dynamic info. Users can use command `SHOW DYNAMIC PARTITION TABLES FROM DBXXX` to know this error. From this error, it will give user hint to modify start if they really specify a error start. --------- Co-authored-by: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com>
…apache#37539) FIX: When dropping dynamic partition, PR apache#35778 will use math.max(start, -history_partition_num) as the first partition, but it may delete users' partitions if they specify both start and history_partition_num inappropriately. For safety reason, revert this behavious changed, only use start as the first partition when dropping partitions. For those who had specified a very small start value, drop partitions will catch an exception , and stop dropping this table's partition and then record this error in dynamic info. Users can use command `SHOW DYNAMIC PARTITION TABLES FROM DBXXX` to know this error. From this error, it will give user hint to modify start if they really specify a error start. --------- Co-authored-by: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com>
…apache#37539) FIX: When dropping dynamic partition, PR apache#35778 will use math.max(start, -history_partition_num) as the first partition, but it may delete users' partitions if they specify both start and history_partition_num inappropriately. For safety reason, revert this behavious changed, only use start as the first partition when dropping partitions. For those who had specified a very small start value, drop partitions will catch an exception , and stop dropping this table's partition and then record this error in dynamic info. Users can use command `SHOW DYNAMIC PARTITION TABLES FROM DBXXX` to know this error. From this error, it will give user hint to modify start if they really specify a error start. --------- Co-authored-by: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com>
| addPartitionClauses = getAddPartitionClause(db, olapTable, partitionColumn, partitionFormat, | ||
| executeFirstTime); | ||
| } | ||
| clearDropPartitionFailedMsg(olapTable.getId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why call clearDropPartitionFailedMsg() here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will cause the status to remain NORMAL even if add partition failed.
FIX:
When dropping dynamic partition, PR #35778 will use math.max(start, -history_partition_num) as the first partition, but it may delete users' partitions if they specify both start and history_partition_num inappropriately. For safety reason, revert this behavious changed, only use start as the first partition when dropping partitions.
For those who had specified a very small start value, drop partitions will catch an exception , and stop dropping this table's partition and then record this error in dynamic info. Users can use command
SHOW DYNAMIC PARTITION TABLES FROM DBXXXto know this error. From this error, it will give user hint to modify start if they really specify a error start.