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

MetaApi supports multi tenant #3759

Closed
Tracked by #3740 ...
BohuTANG opened this issue Jan 4, 2022 · 3 comments · Fixed by #3790
Closed
Tracked by #3740 ...

MetaApi supports multi tenant #3759

BohuTANG opened this issue Jan 4, 2022 · 3 comments · Fixed by #3790
Assignees
Labels
A-meta Area: databend meta serive C-feature Category: feature

Comments

@BohuTANG
Copy link
Member

BohuTANG commented Jan 4, 2022

Summary

It seems MetaApi is a global view, can not get a tenant database/table:

https://github.com/datafuselabs/databend/blob/dd7a004b6b9158769d79bd0502e4802bb53490a7/query/src/catalogs/backends/impls/meta_remote.rs#L79-L137

The KVApi works well with a prefix.

@BohuTANG BohuTANG added C-feature Category: feature A-meta Area: databend meta serive labels Jan 4, 2022
@ariesdevil ariesdevil self-assigned this Jan 4, 2022
@drmingdrmer
Copy link
Member

With tenant id, the namespace for a table would be tenant_id/user_id/database/table or tenant_id/database/table?
I.e., is it legal that two user have database with the same database name?

@ariesdevil
Copy link
Contributor

IMO yes, two tenants can have the same database name and a tenant can have multiple users.
Correct me if I was wrong.

@BohuTANG
Copy link
Member Author

BohuTANG commented Jan 4, 2022

For databend use case, tenant_id/database/table is ok, there is no user_id from catelog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: databend meta serive C-feature Category: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants