-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Support check committed txns before catalog drop meta, like db, table, partition etc #4029
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
Conversation
|
for #3988 |
|
If I use |
@morningman in fe, the txn will be publish timeout, and publish version daemon will try to finish transaction, it find that table have been dropped and will remove table committed info from txn, the txn will be visible. In be, it seems that txns wiil be cleaned by reporter handler? |
|
I found if perform DROP database force, it's committed version will be recovered by RECOVER command? |
@chaoyli I will fix it, make force drop operation do not recycle meta. |
fe/src/main/cup/sql_parser.cup
Outdated
| RESULT = new DropPartitionClause(ifExists, partitionName, isTempPartition); | ||
| RESULT = new DropPartitionClause(ifExists, partitionName, isTempPartition, !isTempPartition); | ||
| :} | ||
| | KW_DROPP opt_tmp:isTempPartition KW_PARTITION opt_if_exists:ifExists ident:partitionName |
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.
DROPP is a not a good syntax. It's better to use
DROP TABLE $table_name FORCE
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.
@chaoyli I has fixed it before. old commit version?
This PR is to ensure that dropped db , table or partition can be with normal state after recovered by user. Commited txns can not be aborted, because the partitions's commited versions have been changed, and some tablets may already have new visible versions. If user just don't want the meta(db, table or partition) anymore, just use dropp instead of drop to skip committed txn check.