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

Tracking issue for implementing mito as a region engine #1869

Closed
40 tasks done
evenyag opened this issue Jul 3, 2023 · 1 comment
Closed
40 tasks done

Tracking issue for implementing mito as a region engine #1869

evenyag opened this issue Jul 3, 2023 · 1 comment
Assignees
Labels
C-enhancement Category Enhancements tracking-issue A tracking issue for a feature.
Milestone

Comments

@evenyag
Copy link
Contributor

evenyag commented Jul 3, 2023

What type of enhancement is this?

Refactor, Tech debt reduction

What does the enhancement do?

For historical reasons, both frontend and table engines (run in datanode) are aware of multiple regions in a table. That makes implementing a distributed table with multi-regions support complicated. We need to deal table and its regions on both frontend and datanode. We also need to implement procedures for the mito engine to ensure the eventual consistency of altering a table.

We decide to turn the table engine into a region engine, which only has knowledge of regions.

  • The TableEngine trait becomes RegionEngine and only deals with regions.
  • The datanode acts like a RegionServer. It manages regions assigned to the node and provides region-level access.
  • The frontend provides table-level access. It partitions requests and routes them to regions on datanodes.
  • We can combine the StorageEngine with the mito table engine.
  • Since we already store metadata of the table in metasrv, there is no need to persist them again to the table manifest. We can remove the table manifest.
  • Altering multiple regions is tracked by the procedure inside metasrv. We don't need procedures for the mito engine.

Steps

We are going to create a new fork of mito crate (maybe mito2).

Other Enhancements

There are also some other enhancements we could achieve during refactoring mito. They may not be strictly related to this issue's topic.

  • Remove dependency of log sequence from RegionMetaAction::Change
  • Decouple LogStore index and engine sequence (switch to sequence per key mode)
  • Remove Option from time range in FileMeta
  • Implement a new RegionWriter that supports batching (group commit)
  • Add column family support? We plan to remove column family
@evenyag evenyag added the C-enhancement Category Enhancements label Jul 3, 2023
@evenyag evenyag self-assigned this Jul 3, 2023
@evenyag evenyag added the tracking-issue A tracking issue for a feature. label Jul 3, 2023
@killme2008 killme2008 added this to the v0.4 milestone Jul 19, 2023
@killme2008
Copy link
Contributor

Looks like we can close this issue 👍

@evenyag evenyag closed this as completed Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category Enhancements tracking-issue A tracking issue for a feature.
Projects
None yet
Development

No branches or pull requests

2 participants