-
Notifications
You must be signed in to change notification settings - Fork 328
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
feat: ttl=0/instant/forever/humantime&ttl refactor #5089
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Copilot reviewed 8 out of 23 changed files in this pull request and generated no suggestions.
Files not reviewed (15)
- src/mito2/src/engine/alter_test.rs: Evaluated as low risk
- src/mito2/src/compaction/window.rs: Evaluated as low risk
- src/mito2/src/worker/handle_alter.rs: Evaluated as low risk
- src/mito2/src/compaction/compactor.rs: Evaluated as low risk
- src/common/base/src/lib.rs: Evaluated as low risk
- src/metric-engine/src/engine/alter.rs: Evaluated as low risk
- src/mito2/src/engine/create_test.rs: Evaluated as low risk
- src/session/Cargo.toml: Evaluated as low risk
- src/mito2/src/engine/open_test.rs: Evaluated as low risk
- src/common/meta/src/ddl/alter_database.rs: Evaluated as low risk
- src/query/src/sql/show_create_table.rs: Evaluated as low risk
- src/session/src/context.rs: Evaluated as low risk
- src/common/meta/src/rpc/ddl.rs: Evaluated as low risk
- src/mito2/src/region/options.rs: Evaluated as low risk
- src/store-api/src/region_request.rs: Evaluated as low risk
Comments skipped due to low confidence (4)
src/common/base/src/ttl.rs:83
- [nitpick] The
Display
implementation forDuration
should use a more standard format like{}s
instead ofDuration({})
.
TimeToLive::Duration(d) => write!(f, "Duration({})", d.as_secs()),
src/common/base/src/ttl.rs:109
- The
as_repr_opt
method should return"forever"
for theForever
variant instead ofNone
.
TimeToLive::Forever => None,
src/common/meta/src/key/schema_name.rs:65
- [nitpick] The variable name
ttl
is ambiguous. It should be renamed to something more descriptive, liketime_to_live
.
if let Some(ttl) = self.ttl.as_repr_opt() {
src/operator/src/insert.rs:427
- Ensure that the new functionality for handling TTL zero regions and tables is covered by tests.
let ttl_zero_regions = ctx.ttl_zero_regions();
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5089 +/- ##
==========================================
- Coverage 84.04% 83.79% -0.25%
==========================================
Files 1158 1163 +5
Lines 216564 216946 +382
==========================================
- Hits 182003 181794 -209
- Misses 34561 35152 +591 |
Use |
How about |
added a fix for alter ttl to instant should remove expired ssts too |
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.
Others LGTM. Most comments are non-blocking.
Don't forget to update the PR title and description. |
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
should |
Let's prohibit the database from setting TTL to |
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
support
ttl='instant'/'forever'
Please explain IN DETAIL what the changes are in this PR and why they are needed:
ttl='instant'/'forever'
, however to keep compatibilty,ttl='0s'/'null'/''
still equals tottl='forever'
Checklist