-
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
Table broken after running incorrect alter statement (standalone mode) ? #2425
Comments
I don't know whether or not this issue depends on only my local environment. |
It seems like the |
The problem is that the table was broken after this operation. Let's take a look. |
@WenyXu I think we should submit the alter requests first and then update the metadata and invalidate caches. Now we always update the metadata first. greptimedb/src/common/meta/src/ddl/alter_table.rs Lines 379 to 381 in e7e254c
Users should not see the new schema until all regions are altered. Once a region returns an invalid argument error, we should abort the procedure. But we still need to fix |
|
I see. I learned a lot of things from your comments about the procedure systems. Thank you!! |
What type of bug is this?
Unexpected error
What subsystems are affected?
Standalone mode (latest commit: e7e254c)
What happened?
Table is broken after running incorrect alter statement. (standalone mode)
You can reproduce this issue by following steps:
This should fail since we can't add a new_column which doesn't allow null and have default value. So, this is no problem.
Once we run the above steps, we can't execute select statements like
select * from table_name
. (maybe any statement for this table)You can any statements which aren't related to this table, like so:
What operating system did you use?
Mac OS (Ventura 13.3) (Maybe any OS)
Relevant log output and stack trace
By the way, after closing mysql client, it seems like there's the same problem.
How can we reproduce the bug?
This should fail since we can't add a new_column which doesn't allow null and have default value.
Once we run the above steps, we can't execute select statements like
select * from table_name
. (maybe any statement for this table)The text was updated successfully, but these errors were encountered: