Skip to content

Conversation

@caiconghui
Copy link
Contributor

@caiconghui caiconghui commented Jul 6, 2020

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.

@caiconghui
Copy link
Contributor Author

for #3988

@morningman
Copy link
Contributor

If I use DROPP Table to forcibly drop a table with COMMITTED txns.
Can those COMMITTED txns be cleaned automatically?

@caiconghui
Copy link
Contributor Author

caiconghui commented Jul 6, 2020

If I use DROPP Table to forcibly drop a table with COMMITTED txns.
Can those COMMITTED txns be cleaned automatically?

@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?

@caiconghui caiconghui changed the title Support check commited txns before catalog drop meta, like db, table, partition etc Support check committed txns before catalog drop meta, like db, table, partition etc Jul 6, 2020
@chaoyli
Copy link
Contributor

chaoyli commented Jul 19, 2020

I found if perform DROP database force, it's committed version will be recovered by RECOVER command?

@caiconghui
Copy link
Contributor Author

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.

chaoyli
chaoyli previously approved these changes Jul 27, 2020
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
Copy link
Contributor

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

Copy link
Contributor Author

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?

@chaoyli chaoyli merged commit 150f8e0 into apache:master Jul 28, 2020
morningman pushed a commit that referenced this pull request Jul 30, 2020
…read and add doc content for drop meta check (#4205)

This PR is mainly do three things:
1. Fix fe meta version bug introduced by #4029 , when fix conflict with #4086 
2. Make drop check code easy to read
3. Add doc content for drop meta check
@caiconghui caiconghui deleted the drop_check branch July 30, 2020 02:20
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.

3 participants