-
Notifications
You must be signed in to change notification settings - Fork 762
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
Feature: impl rename_database with kv-txn #5197
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Thanks for the contribution! Please review the labels and make any necessary changes. |
@@ -143,6 +146,35 @@ impl RequestHandler<DropDatabaseReq> for ActionHandler { | |||
} | |||
} | |||
|
|||
#[async_trait::async_trait] | |||
impl RequestHandler<RenameDatabaseReq> for ActionHandler { |
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.
This seems not a KV API. Is it the old-way meta API?
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.
This seems not a KV API. Is it the old-way meta API?
After all meta API has impl by KV api, all the meta handlers in old way will be removed. But now, in order to pass compile, it has to impl with an old way API.
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.
When renaming a db, it has to assert the dest db-name does not exist.
BTW, this is not a emergency task for now, it is in the postponed task list. Meanwhile the first to do is to replace the old MetaApi impls with the kv-txn based impl. After that, this PR will be simpler to impl too
let txn_req = TxnRequest { | ||
condition: vec![ | ||
self.txn_cond_seq(tenant_dbname, Eq, db_id_seq)?, | ||
self.txn_cond_seq(&db_id_key, Eq, db_meta_seq)?, |
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.
Maybe a rename
does not need to be blocked by db_meta
changes.
Ok. |
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
Feature: impl rename_database with kv-txn
Changelog
Related Issues
Fixes Issue #5192