Skip to content

[core] Add partition format check if partition expire time is set#7428

Open
tsreaper wants to merge 3 commits intoapache:masterfrom
tsreaper:partition-format
Open

[core] Add partition format check if partition expire time is set#7428
tsreaper wants to merge 3 commits intoapache:masterfrom
tsreaper:partition-format

Conversation

@tsreaper
Copy link
Contributor

@tsreaper tsreaper commented Mar 16, 2026

Purpose

Users may set an incorrect partition key, or an incorrect time format for partition expire. Under such case, partitions won't expire and will increase the storage size infinitely. To avoid this problem, this PR adds a check for partition format if partition expire time is set

Tests

  • TableWriteTest#testPartitionTimestampValidation.

API and Format

No format changes.

Documentation

Config option is added to enable this feature.

Generative AI tooling

Generated-by: qodercli 0.1.31

Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

Maybe we should add an option to give an option to be compatible to old version.

By default, throw exception.

@tsreaper
Copy link
Contributor Author

Maybe we should add an option to give an option to be compatible to old version.

By default, throw exception.

User can reset partition expire related options. Because if there is exception, partition expire has no use to the user.

@JingsongLi
Copy link
Contributor

What if there are illegal partitions and the user only wants expired normal partitions?

@JingsongLi
Copy link
Contributor

A simple example is the partitioning of null values.

@JingsongLi
Copy link
Contributor

Even more so, I believe that the previous compatibility should not be compromised. If there are too many partitions, it should be restricted by the REST server rather than the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants