Skip to content
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

Add documentation for disable_tiering #3496

Merged
merged 6 commits into from
Oct 15, 2024
Merged

Add documentation for disable_tiering #3496

merged 6 commits into from
Oct 15, 2024

Conversation

gayyappan
Copy link
Contributor

Documentation for disable_tiering API

Copy link

github-actions bot commented Oct 9, 2024

Allow 10 minutes from last push for the staging site to build. If the link doesn't work, try using incognito mode instead. For internal reviewers, check web-documentation repo actions for staging build status. Link to build for this PR: http://docs-dev.timescale.com/docs-upd2

Copy link
Contributor

@iroussos iroussos left a comment

Choose a reason for hiding this comment

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

Thank you @gayyappan, added a few comments

Comment on lines 2 to 3
title: Creating a tiering policy
excerpt: How to create a tiering policy
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
title: Creating a tiering policy
excerpt: How to create a tiering policy
title: Disabling tiering for a hypertable
excerpt: How to disable tiering for a hypertable

Copy link
Contributor

Choose a reason for hiding this comment

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

Disable tiering for a hypertable

No ing words please :-).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

use-timescale/data-tiering/disabling-data-tiering.md Outdated Show resolved Hide resolved
Comment on lines 14 to 23
In order to use this API, first call [remove_tiering_policy][tiering-policy] to drop
any tiering policy associated with this hypertable. Second, make sure that there is
no tiered data associated with this hypertable.

This query lists the tiered chunks associated with this hypertable.
```sql
select * from timescaledb_osm.tiered_chunks
```

If you have any tiered chunks, you must either untier this data or drop these chunks
Copy link
Contributor

Choose a reason for hiding this comment

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

@gayyappan you may want to disable tiering on a service but leave the tiered data - for example, if there is another service (fork, etc) that has access to the same data. Am I right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is metadata specific to this service/instance. It does not control what happens on a fork.

Copy link
Contributor

Choose a reason for hiding this comment

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

@gayyappan what I meant was that they do not need to make sure that they untier everything - their data is still there if at least another service has a reference to them.

Or is it that if they don't do so their catalog will be broken and hence we require them to manually drop the chunk for this service?

If so, we should make this more clear. Both that (1) as long as there is another service with access to the same tiered data they do not lose the data and that (2) they need to do something with those chunks before disabling tiering.

Otherwise, the way it is written now it feels like the primary reason to do so is to keep the data.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We added this API in response to users who want to untier everything and then make some schema modifications. We had to manually go and fix everything to remove tiering capabilities for that hypertable - drop the foreign table etc.
Or they still foreign chunks in their plans etc.

Probably needs a rewrite if this is confusing. Please take a stab at it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO, Bringing up another service in this context is confusing. A fork always respects a fork's semantics (i.e. the primary and fork will/can diverge).
a replica respects a replica's semantics i.e. primary and replica will be in sync.
So this is not related to tiering?

Copy link
Contributor Author

@gayyappan gayyappan Oct 11, 2024

Choose a reason for hiding this comment

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

I made some changes to the doc. Hopefully this reads better now. @billy-the-fish @iroussos all yours now :-)

from tiered storage. You can use the [untier_chunk][untier-data] procedure
to untier chunks that have already been tiered to local storage.

If these two preconditions are met, you can use the disable_tiering function to drop all tiering related metadata for the hypertable.
Copy link
Contributor

Choose a reason for hiding this comment

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

-you can use the disable_tiering function
+you can use the `disable_tiering` function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

Comment on lines 18 to 21
This query lists the tiered chunks associated with this hypertable.
```sql
select * from timescaledb_osm.tiered_chunks
```
Copy link
Contributor

Choose a reason for hiding this comment

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

I checked a few doc pages, example queries are usually ended by ; (surprisingly not all though, but most).

Also technically this query shows all tiered chunks, not just "associated with this hypertable". I wonder if this should be rephrased somehow or the query adjusted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

@billy-the-fish
Copy link
Contributor

billy-the-fish commented Oct 10, 2024

Really cool doc. How about we combine https://docs-dev.timescale.com/docs-upd2/use-timescale/upd2/data-tiering/enabling-data-tiering/, https://docs-dev.timescale.com/docs-upd2/use-timescale/upd2/data-tiering/creating-data-tiering-policy/ and this doc into one page called Manage data tiering or some such like?

If you are ok with the idea i will bash this together for you.

@iroussos
Copy link
Contributor

Really cool doc. How about we combine https://docs-dev.timescale.com/docs-upd2/use-timescale/upd2/data-tiering/enabling-data-tiering/, https://docs-dev.timescale.com/docs-upd2/use-timescale/upd2/data-tiering/creating-data-tiering-policy/ and this doc into one page called Manage data tiering or some such like?

If you are ok with the idea i will bash this together for you.

Sounds like a great idea @billy-the-fish! Let's go for it :-)

@billy-the-fish
Copy link
Contributor

Cool. I will have a bash tomorrow or monday

@gayyappan
Copy link
Contributor Author

Cool. I will have a bash tomorrow or monday

Yes, I am happy to have you take over this PR and get the doc changes in.
Thanks for the help @billy-the-fish

@billy-the-fish billy-the-fish merged commit e32e110 into latest Oct 15, 2024
3 checks passed
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.

4 participants