Uh oh!
There was an error while loading. Please reload this page.
[fix](dynamic partition) fix dynamic partition thread met uncatch exception - #35778
Merged
dataroaring merged 11 commits intoJun 3, 2024
Merged
Conversation
doris-robot
commented
Jun 3, 2024
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
yujun777
commented
Jun 3, 2024
ContributorAuthor
run buildall |
Contributor
PR approved by anyone and no changes requested. |
yujun777
commented
Jun 3, 2024
ContributorAuthor
run buildall |
doris-robot
commented
Jun 3, 2024
TPC-H: Total hot run time: 39982 ms |
Contributor
PR approved by at least one committer and no changes requested. |
doris-robot
commented
Jun 3, 2024
TPC-DS: Total hot run time: 172449 ms |
doris-robot
commented
Jun 3, 2024
ClickBench: Total hot run time: 31.17 s |
yujun777force-pushed
the
fix-dynamic-partiton-start-fail
branch
from
June 3, 2024 07:04
78bedce to
2799dedCompareyujun777
commented
Jun 3, 2024
ContributorAuthor
run buildall |
seawinde pushed a commit
to seawinde/doris
that referenced
this pull request
Jun 5, 2024
…eption (apache#35778) dynamic partition thread get table's drop clause met an error due to dynamic_partition.start = -99999999 ``` 2024-05-23 10:40:32,072 ERROR (DynamicPartitionScheduler|53) [Daemon.run():118] daemon thread got exception. name: DynamicPartitionScheduler org.apache.doris.nereids.exceptions.AnalysisException: date/datetime literal [+271768-09-11 00:00:00] is invalid at org.apache.doris.nereids.trees.expressions.literal.DateLiteral.normalize(DateLiteral.java:202) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.trees.expressions.literal.DateTimeLiteral.determineScale(DateTimeLiteral.java:107) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.types.DateTimeV2Type.forTypeFromString(DateTimeV2Type.java:91) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.trees.expressions.literal.DateTimeV2Literal.<init>(DateTimeV2Literal.java:38) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.catalog.PartitionKey.getDateTimeLiteral(PartitionKey.java:120) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.catalog.PartitionKey.createPartitionKey(PartitionKey.java:98) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.clone.DynamicPartitionScheduler.getDropPartitionClause(DynamicPartitionScheduler.java:431) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.clone.DynamicPartitionScheduler.executeDynamicPartition(DynamicPartitionScheduler.java:555) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.clone.DynamicPartitionScheduler.runAfterCatalogReady(DynamicPartitionScheduler.java:641) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.common.util.MasterDaemon.runOneCycle(MasterDaemon.java:58) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.common.util.Daemon.run(Daemon.java:116) ~[doris-fe.jar:1.2-SNAPSHOT] ``` BUG: 1. dynamic partition thread not catch org.apache.doris.nereids.exceptions.AnalysisException; 2. getDropClauses use dynamic_partition.start as the partitions's start. But it's error, it should should max(dynamic_partition.start, -dynamic_partition.history_partition_num). FIX: 1. dynamic partition thread catch org.apache.doris.nereids.exceptions.AnalysisException; 2. getDropClauses use start = max(dynamic_partition.start, -dynamic_partition.history_partition_num); 3. When create table (i.e. create dynamic partion first time), if met an exception, then throw this exception out, then create table will fail, so user can known this error;
yujun777 added a commit
to yujun777/doris
that referenced
this pull request
Jul 9, 2024
…pache#37488) Fix: for creating table, if create dynamic partition throw exception (pr apache#35778), then create table will fail, then drop table, but it forget to write an editlog.
yujun777 added a commit
to yujun777/doris
that referenced
this pull request
Jul 9, 2024
…pache#37488) Fix: for creating table, if create dynamic partition throw exception (pr apache#35778), then create table will fail, then drop table, but it forget to write an editlog.
morningman pushed a commit
that referenced
this pull request
Jul 9, 2024
…#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>
dataroaring added a commit
that referenced
this pull request
Jul 9, 2024
…#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>
yujun777 added a commit
to yujun777/doris
that referenced
this pull request
Jul 10, 2024
…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>
yujun777 added a commit
to yujun777/doris
that referenced
this pull request
Jul 10, 2024
…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>
dataroaring pushed a commit
that referenced
this pull request
Jul 17, 2024
…t throw exception (#37924) PR #35778 will throw exception if dynamic partition overlap with others. Don't throw exception due to considering no behaviour change. Just ignore create this partition. SQL: ``` PARTITION BY RANGE(`dt`)( PARTITION `phistory` VALUES less than ('2024-01-01') ) DISTRIBUTED BY HASH(`user_id`, `room_id`) BUCKETS 3 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "dynamic_partition.enable" = "true", "dynamic_partition.time_unit" = "DAY", "dynamic_partition.end" = "10", "dynamic_partition.prefix" = "p", "dynamic_partition.create_history_partition" = "true", "dynamic_partition.history_partition_num" = "250" ); ``` error: ``` ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = errCode = 2, detailMessage = Range [types: [DATEV2]; keys: [0000-01-01]; ..types: [DATEV2]; keys: [2024-01-01]; ) is intersected with range: [types: [DATEV2]; keys: [2023-12-29]; ..types: [DATEV2]; keys: [2023-12-30]; ) ```
dataroaring pushed a commit
that referenced
this pull request
Jul 17, 2024
…t throw exception (#37924) PR #35778 will throw exception if dynamic partition overlap with others. Don't throw exception due to considering no behaviour change. Just ignore create this partition. SQL: ``` PARTITION BY RANGE(`dt`)( PARTITION `phistory` VALUES less than ('2024-01-01') ) DISTRIBUTED BY HASH(`user_id`, `room_id`) BUCKETS 3 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "dynamic_partition.enable" = "true", "dynamic_partition.time_unit" = "DAY", "dynamic_partition.end" = "10", "dynamic_partition.prefix" = "p", "dynamic_partition.create_history_partition" = "true", "dynamic_partition.history_partition_num" = "250" ); ``` error: ``` ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = errCode = 2, detailMessage = Range [types: [DATEV2]; keys: [0000-01-01]; ..types: [DATEV2]; keys: [2024-01-01]; ) is intersected with range: [types: [DATEV2]; keys: [2023-12-29]; ..types: [DATEV2]; keys: [2023-12-30]; ) ```
mongo360 pushed a commit
to mongo360/doris
that referenced
this pull request
Aug 16, 2024
…eption apache#35778 (apache#35824) cherry pick from apache#35778
HappenLee pushed a commit
to HappenLee/incubator-doris
that referenced
this pull request
Apr 24, 2026
…eption (apache#35778) dynamic partition thread get table's drop clause met an error due to dynamic_partition.start = -99999999 ``` 2024-05-23 10:40:32,072 ERROR (DynamicPartitionScheduler|53) [Daemon.run():118] daemon thread got exception. name: DynamicPartitionScheduler org.apache.doris.nereids.exceptions.AnalysisException: date/datetime literal [+271768-09-11 00:00:00] is invalid at org.apache.doris.nereids.trees.expressions.literal.DateLiteral.normalize(DateLiteral.java:202) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.trees.expressions.literal.DateTimeLiteral.determineScale(DateTimeLiteral.java:107) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.types.DateTimeV2Type.forTypeFromString(DateTimeV2Type.java:91) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.trees.expressions.literal.DateTimeV2Literal.<init>(DateTimeV2Literal.java:38) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.catalog.PartitionKey.getDateTimeLiteral(PartitionKey.java:120) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.catalog.PartitionKey.createPartitionKey(PartitionKey.java:98) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.clone.DynamicPartitionScheduler.getDropPartitionClause(DynamicPartitionScheduler.java:431) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.clone.DynamicPartitionScheduler.executeDynamicPartition(DynamicPartitionScheduler.java:555) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.clone.DynamicPartitionScheduler.runAfterCatalogReady(DynamicPartitionScheduler.java:641) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.common.util.MasterDaemon.runOneCycle(MasterDaemon.java:58) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.common.util.Daemon.run(Daemon.java:116) ~[doris-fe.jar:1.2-SNAPSHOT] ``` BUG: 1. dynamic partition thread not catch org.apache.doris.nereids.exceptions.AnalysisException; 2. getDropClauses use dynamic_partition.start as the partitions's start. But it's error, it should should max(dynamic_partition.start, -dynamic_partition.history_partition_num). FIX: 1. dynamic partition thread catch org.apache.doris.nereids.exceptions.AnalysisException; 2. getDropClauses use start = max(dynamic_partition.start, -dynamic_partition.history_partition_num); 3. When create table (i.e. create dynamic partion first time), if met an exception, then throw this exception out, then create table will fail, so user can known this error;
HappenLee pushed a commit
to HappenLee/incubator-doris
that referenced
this pull request
Apr 24, 2026
…pache#37488) Fix: for creating table, if create dynamic partition throw exception (pr apache#35778), then create table will fail, then drop table, but it forget to write an editlog.
HappenLee pushed a commit
to HappenLee/incubator-doris
that referenced
this pull request
Apr 24, 2026
…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>
HappenLee pushed a commit
to HappenLee/incubator-doris
that referenced
this pull request
Apr 24, 2026
…t throw exception (apache#37924) PR apache#35778 will throw exception if dynamic partition overlap with others. Don't throw exception due to considering no behaviour change. Just ignore create this partition. SQL: ``` PARTITION BY RANGE(`dt`)( PARTITION `phistory` VALUES less than ('2024-01-01') ) DISTRIBUTED BY HASH(`user_id`, `room_id`) BUCKETS 3 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "dynamic_partition.enable" = "true", "dynamic_partition.time_unit" = "DAY", "dynamic_partition.end" = "10", "dynamic_partition.prefix" = "p", "dynamic_partition.create_history_partition" = "true", "dynamic_partition.history_partition_num" = "250" ); ``` error: ``` ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = errCode = 2, detailMessage = Range [types: [DATEV2]; keys: [0000-01-01]; ..types: [DATEV2]; keys: [2024-01-01]; ) is intersected with range: [types: [DATEV2]; keys: [2023-12-29]; ..types: [DATEV2]; keys: [2023-12-30]; ) ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dynamic partition thread get table's drop clause met an error due to dynamic_partition.start = -99999999
BUG:
FIX:
Proposed changes
Issue Number: close #xxx