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: Migrate catalog info into table info #15857

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented Jun 21, 2024

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

Summary

This PR will migrate catalog info into table info.

We previously stored catalog_name: String in TableMeta, which persisted in metasrv. However, this design was flawed as we only have a single catalog named default in each metasrv instance.

This PR removed catalog_name in TableMeta, instead, add catalog_info: Arc<CatalogInfo> in TableInfo. This change makes existing code to work as before and make it much easier for external catalog to implement.

For example, it's a strong requirement to allowing build a table from TableInfo. In the fast, we have to store catalog related information in table options or engine options. But now, we can use CatalogInfo directly without extra work.

This PR removes all blockers of migrating to iceberg-rust, part of #15809

Tests

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

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo Xuanwo requested a review from drmingdrmer as a code owner June 21, 2024 10:40
@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label Jun 21, 2024
Copy link
Member

@drmingdrmer drmingdrmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 56 of 56 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @BohuTANG, @dantengsky, and @youngsofun)

@Xuanwo Xuanwo added this pull request to the merge queue Jun 21, 2024
Merged via the queue into databendlabs:main with commit 9904f24 Jun 21, 2024
77 checks passed
@Xuanwo Xuanwo deleted the remove-catalog-in-table-meta branch June 21, 2024 12:22
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.

2 participants