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

Alter table options #1084

Open
killme2008 opened this issue Feb 26, 2023 · 3 comments
Open

Alter table options #1084

killme2008 opened this issue Feb 26, 2023 · 3 comments
Labels
C-enhancement Category Enhancements help wanted Extra attention is needed
Milestone

Comments

@killme2008
Copy link
Contributor

What type of enhancement is this?

API improvement, Configuration

What does the enhancement do?

For example, modify the table's TTL to 30 days:

ALTER TABLE monitor MODIFY TTL '30d';

Not all of the table options can be modified. The regions option can't be changed right now. Maybe we can manage a white list that contains alterable options.

Implementation challenges

How to make the change takes effect dynamically? I am not sure. I think we can implement a observer pattern for it.

@killme2008 killme2008 added the C-enhancement Category Enhancements label Feb 26, 2023
@killme2008 killme2008 added this to the v0.4 milestone Jun 20, 2023
@killme2008 killme2008 self-assigned this Jun 20, 2023
@killme2008
Copy link
Contributor Author

killme2008 commented Jul 31, 2023

After discussing and investigating, decide to use the following syntax:

alter table set options(ttl='30d', write_buffer_size='32mb');

The syntax for options is the same as that for creating tables. The other keywords at the options position can be used to set other table features.

@killme2008 killme2008 modified the milestones: v0.4, v0.5 Oct 11, 2023
@NiwakaDev
Copy link
Collaborator

I guess that we don't allow changing storage option.

@killme2008
Copy link
Contributor Author

killme2008 commented Nov 13, 2023

I guess that we don't allow changing storage option.

Yes, of course. I've done some preliminary work in #2051 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category Enhancements help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants