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: Define RegionId as a new type #1903

Merged
merged 3 commits into from
Jul 7, 2023

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented Jul 7, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This PR refactors the RegionId into a new type to avoid misuse. It also provides some helper methods to get table id and region number from a region id.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@evenyag evenyag self-assigned this Jul 7, 2023
@evenyag evenyag marked this pull request as ready for review July 7, 2023 08:45
Copy link
Collaborator

@MichaelScofield MichaelScofield left a comment

Choose a reason for hiding this comment

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

I think this is something we should've done in day 1.

src/store-api/src/storage/descriptors.rs Show resolved Hide resolved
@waynexia waynexia merged commit f731193 into GreptimeTeam:develop Jul 7, 2023
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* refactor: Define RegionId as a new type

* chore: use into

* feat: custom debug print for region id

fix: test_show_create_table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants