Skip to content

[Dynamic Partition] reserve specific history periods by dynamic partition. - #6554

Merged
morningman merged 16 commits into
apache:masterfrom
Henry2SS:whz_dynamic_partition
Sep 28, 2021
Merged

[Dynamic Partition] reserve specific history periods by dynamic partition.#6554
morningman merged 16 commits into
apache:masterfrom
Henry2SS:whz_dynamic_partition

Conversation

@Henry2SS

Copy link
Copy Markdown
Contributor

Proposed changes

Add RESERVED_HISTORY_STARTS and RESERVED_HISTORY_ENDS.
Fixes#6514

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)
  • [x ] 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...)
  • Optimization. Including functional usability improvements and performance improvements.
  • Dependency. Such as changes related to third-party components.
  • Other.

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.

  • [ x] 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...

@Henry2SS

Copy link
Copy Markdown
ContributorAuthor

I will add some unit-tests later.
And I have already compiled and validated this function in my own clusters.

@Henry2SS
Henry2SSforce-pushed the whz_dynamic_partition branch 4 times, most recently from f779054 to bda1918CompareSeptember 3, 2021 12:15
@morningmanmorningman added area/dynamic-partition kind/feature Categorizes issue or PR as related to a new feature. labels Sep 6, 2021
@morningman

Copy link
Copy Markdown
Contributor

hi @Henry2SS please update the document

@Henry2SS

Copy link
Copy Markdown
ContributorAuthor

hi @Henry2SS please update the document

Done.

@Henry2SS
Henry2SSforce-pushed the whz_dynamic_partition branch from 88f8036 to d10cf87CompareSeptember 7, 2021 09:37
@Henry2SSHenry2SS changed the title modify dynamic partition.[Dynamic Partition] reserve specific history periods by dynamic partition.Sep 8, 2021

```
["2020-06-01","2020-06-20"),
["2020-10-31","2020-11-15")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why using closed open range? Not closed range?

private static void checkReservedHistoryStarts(String reservedHistoryStarts) throws DdlException{
String[] starts = reservedHistoryStarts.split(",");
if (starts.length == 0) {
//ErrorReport.reportDdlException(ErrorCode.ERROR_DYNAMIC_PARTITION_RESERVED_HISTORY_STARTS_EMPTY);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not using ErrorReport.reportDdlException?

@Henry2SS

Copy link
Copy Markdown
ContributorAuthor

Hi, @morningman changed reserved history periods from closedOpen to closed. Thanks for your advice.

@caiconghui

Copy link
Copy Markdown
Contributor

how about comibine two configs into one config, use reserved_history_list instead of reserved_history_starts and reserved_history_ends, and we can set the property like "[2021-01-01, 2021-01-31] , [2021-02-03, 2021-02-15]", and use pattern to check the property and extract property

@Henry2SS

Copy link
Copy Markdown
ContributorAuthor

how about comibine two configs into one config, use reserved_history_list instead of reserved_history_starts and reserved_history_ends, and we can set the property like "[2021-01-01, 2021-01-31] , [2021-02-03, 2021-02-15]", and use pattern to check the property and extract property

Great idea. And i've finished changing it to reserved_history_periods. And ut will be modified later.

@caiconghui

Copy link
Copy Markdown
Contributor

please rebase master to solve the conflicts problem

@Henry2SS
Henry2SSforce-pushed the whz_dynamic_partition branch 3 times, most recently from d976679 to 8436d16CompareSeptember 14, 2021 05:15
@Henry2SS

Copy link
Copy Markdown
ContributorAuthor

please rebase master to solve the conflicts problem

Done.

@Henry2SSHenry2SS mentioned this pull request Sep 22, 2021
3 tasks
@Henry2SS

Copy link
Copy Markdown
ContributorAuthor

@morningman Hi, it could reserve history periods when the TIME_UNIT is set to HOUR now. And modified docs and add two more unit-test to do validation.

@Henry2SS
Henry2SSforce-pushed the whz_dynamic_partition branch 2 times, most recently from 3f6d2db to 1233b3bCompareSeptember 26, 2021 07:58

@morningmanmorningman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Sep 28, 2021
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@morningman
morningman merged commit cdf9f9e into apache:masterSep 28, 2021
@morningmanmorningman mentioned this pull request Oct 10, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.area/dynamic-partitionkind/featureCategorizes issue or PR as related to a new feature.reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DynamicPartition] support retention for specified period of history time.

3 participants

@Henry2SS@morningman@caiconghui