-
Notifications
You must be signed in to change notification settings - Fork 468
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
Additional callouts for row-level TTL #13703
Comments
Richard Loveland (rmloveland) commented: {quote}it may be worth documenting on the TTL docs that tables with multiple indexes may benefit from a lower delete_batch_size, as secondary indexes touch multiple ranges and a larger batch size means potentially more ranges being touched which potentially impacts cluster-wide latency. let me know if you need clarification!{quote} |
Richard Loveland (rmloveland) commented: couple questions:
|
Vy Ton (vy-ton) commented: For schema changes with backfills, there was concern that the schema change itself would be treated as a row update and therefore would push {{crdb_internal_expiration}}. But this is not the case, so schema changes do not change {quote}what is meant by the comment “what value {{ttl_expire_after}} is set to during backfill”? presumably the user set the expiration themself when they added TTL to the table (per this slide) so the value is set to the value of ~ {{now() + ttl_expire_after}} from the point in time when they issued the schema change? or is that not the behavior, and hence the surprise?{quote} Setting TTL on an existing table requires a schema change with backfill to create the {{crdb_internal_expiration}} column - that’s what we want users to note. The default behavior sets the {{expiration}} column to {{now() + ttl_expire_after}} like you noted. A user adding TTL to existing tables prob has some other logic to control deletion in which case they need to wait for cockroachdb/cockroach#76916 |
Vy Ton (vy-ton) commented: |
Richard Loveland (rmloveland) commented: By “migration of existing tables” do you mean the info about how the schema change when you add TTL to a table does not change {{crdb_internal_expiration}} ? If so that info is in the PR AFAICT and should be showing up soon on https://www.cockroachlabs.com/docs/v22.1/row-level-ttl.html Let me know if I should have tagged you on the PR. I did not because it was not really product positioning stuff, only some technical details PS thanks for answering my questions before, not sure why I forgot to respond. |
Richard Loveland (rmloveland) commented: or at least that was my understanding, please let me know if that was incorrect. happy to update my understanding / do something different |
Vy Ton (vy-ton) commented: {quote}By “migration of existing tables” do you mean the info about how the schema change when you add TTL to a table does not change {{crdb_internal_expiration}} ?{quote} No, I want to highlight the unfulfilled user story for taking an existing large table and adding TTL to it. Right now, the UX is non-ideal, details here. In 22.1, we need to backfill a new column and the expiration timestamp is set to {{now() + ttl_expire_after}} |
Richard Loveland (rmloveland) commented: Ah ok, right now the docs on adding TTL to an existing table say “Adding or changing the Row-Level TTL settings for an existing table will result in a schema change that sets the {{crdb_internal_expiration}} column for all rows. Depending on table size, this could be an expensive operation.” Are you saying that you would like to add more detail to that info? specifically, add the detail that CockroachDB needs to backfill a new column and the expiration timestamp is set to {{now() + ttl_expire_after }} ? If yes, I can make a PR to add that ASAP If no, please advise 🙂 |
Vy Ton (vy-ton) commented: Yes and can you mention it in the {{Limitation}} section as well. It relates to the note about “The TTL cannot be customized based on the values of other columns in the row. cockroachdb/cockroach#76916” because for an existing table you might already have a column that TTL should use. My goal here is for users to understand that creating new tables with TTL is well supported. Adding TTL to existing tables, especially when they are large, will have better user experience in 22.2 |
Vy Ton (vy-ton) commented:
Vy Ton (vy-ton) commented:
Vy Ton (vy-ton) commented:
This issue is a meta-issue of additional callout and enhancements to row-level TTL docs:
ttl_expire_after
is set to during backfill. Let's also move the known limitations higher up on the page.If you want to have metrics labelled by table name (at the risk of added cardinality)
, we should discuss and/or link to the [docs on changefeed metrics lables](https://www.cockroachlabs.com/docs/stable/monitor-and-debug-changefeeds.html#using-changefeed-metrics-labels] since it discusses certain limitationscrdb_internal_expiration
ttl_expire_after
once its already setJira Issue: DOC-3545
The text was updated successfully, but these errors were encountered: