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

refactor: introduce UninitTenant and TIdentRaw #15207

Merged
merged 3 commits into from
Apr 12, 2024

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Apr 11, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

refactor: introduce UninitTenant and TIdentRaw

Tenant is a meta-service key component representing a tenant,
with a embedded per-tenant config.

UninitTenant is a shadow of TIdent but without config thus it can
not be used as a key.
UninitTenant can be initialized to build a Tenant for use as a
meta-service key.

Correspondingly, this commit introduce TIdentRaw as an uninitialized
version of TIdent.
TIdentRaw does not cantain per-tenant config and is only used inside
meta-service values(not keys), which could be serde.

Other changes:

Populate usage of Tennat to Catalog implementation.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Refactoring

Related Issues


This change is Reviewable

@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label Apr 11, 2024
@drmingdrmer drmingdrmer force-pushed the 43-tident-value branch 7 times, most recently from dcf3105 to c639c6d Compare April 11, 2024 12:40
@drmingdrmer drmingdrmer marked this pull request as ready for review April 11, 2024 13:06
`Tenant` is a meta-service key component representing a tenant,
with a embedded per-tenant config.

`UninitTenant` is a shadow of `TIdent` but without config thus it can
not be used as a key.
`UninitTenant` can be initialized to build a `Tenant` for use as a
meta-service key.

Correspondingly, this commit introduce `TIdentRaw` as an uninitialized
version of `TIdent`.
`TIdentRaw` does not cantain per-tenant config and is only used inside
meta-service values(not keys), which could be `serde`.

Other changes:

Populate usage of `Tennat` to `Catalog` implementation.
@drmingdrmer drmingdrmer merged commit a4de86c into datafuselabs:main Apr 12, 2024
72 of 73 checks passed
@drmingdrmer drmingdrmer deleted the 43-tident-value branch April 12, 2024 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-refactor this PR changes the code base without new features or bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants