Skip to content

[DynamicPartition] Support specifying hot data partition#5877

Merged
morningman merged 3 commits intoapache:masterfrom
morningman:dynamic_storage_medium
May 26, 2021
Merged

[DynamicPartition] Support specifying hot data partition#5877
morningman merged 3 commits intoapache:masterfrom
morningman:dynamic_storage_medium

Conversation

@morningman
Copy link
Contributor

Proposed changes

In some scenarios, when users use dynamic partitions, they hope to use Doris' hierarchical storage
function at the same time.
For example, for the dynamic partition rule of partitioning by day, we hope that the partitions of the last 3 days
are stored on the SSD storage medium and automatically migrated to the HDD storage medium after expiration.

This CL add a new dynamic partition property: "hot_partition_num".
This parameter is used to specify how many recent partitions need to be stored on the SSD storage medium.

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)
  • Code refactor (Modify the code structure, format the code, etc...)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have created an issue on (Fix #ISSUE) and described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • If these changes need document changes, I have updated the document
  • Any dependent changes have been merged

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@morningman morningman added the kind/feature Categorizes issue or PR as related to a new feature. label May 22, 2021
@morningman morningman force-pushed the dynamic_storage_medium branch from 69801dc to 70e30a0 Compare May 22, 2021 15:42

* `dynamic_partition.hot_partition_num`

Specify how many of the latest partitions are hot partitions. For hot partition, the system will automatically set its `storage_medium` parameter to SSD, and set `storage_cooldown_time`. Assuming that the partition is divided by day and the parameter is set to 2, then the partitions of the last 2 days, `storage_medium` are all SSDs. The `storage_cooldown_time` of yesterday's partition is 0 o'clock tomorrow, and the `storage_cooldown_time` of today's partition is 0 o'clock the day after tomorrow.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to point out that the latest partition is the current partition rather than dynamic_partition.end partition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I use a case to explain it more clear

@qidaye
Copy link
Contributor

qidaye commented May 25, 2021

LGTM

Copy link
Contributor

@EmmyMiao87 EmmyMiao87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@EmmyMiao87 EmmyMiao87 added the approved Indicates a PR has been approved by one committer. label May 25, 2021
@EmmyMiao87 EmmyMiao87 self-assigned this May 25, 2021
@morningman morningman merged commit 510606d into apache:master May 26, 2021
stdpain pushed a commit to stdpain/incubator-doris that referenced this pull request Jul 8, 2021
In some scenarios, when users use dynamic partitions, they hope to use Doris' hierarchical storage
function at the same time.
For example, for the dynamic partition rule of partitioning by day, we hope that the partitions of the last 3 days
are stored on the SSD storage medium and automatically migrated to the HDD storage medium after expiration.

This CL add a new dynamic partition property: "hot_partition_num".
This parameter is used to specify how many recent partitions need to be stored on the SSD storage medium.
@morningman morningman mentioned this pull request Oct 10, 2021
Hastyshell pushed a commit to Hastyshell/doris that referenced this pull request Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. kind/feature Categorizes issue or PR as related to a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants