Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

luna: add a draft RFC #241

Closed
wants to merge 1 commit into from
Closed

luna: add a draft RFC #241

wants to merge 1 commit into from

Conversation

huachaohuang
Copy link
Owner

@huachaohuang huachaohuang commented Dec 30, 2021

Rendered version: https://github.com/huachaohuang/engula/blob/luna-rfc/docs/rfcs/20211230-luna-engine.md

This is still an early draft design document. Send it here to guide future development and will not merge it in a short time. The design will be evolved along with the implementation.

@huachaohuang huachaohuang marked this pull request as draft December 30, 2021 12:53

## Data Layout

A collection consists of a `MemStore` and a `BaseStore`. A `MemStore` contains one active memtable and multiple immutable memtables. Immutable memtables are flushed to `BaseStore` as tables. `BaseStore` can organize tables in different ways. For example, a classic LSM-Tree with multiple levels and each level consists of multiple disjoint tables. Tables of a collection are stored as objects in the same `Kernel` bucket. `BaseStore` delegates `Kernel` to schedule background jobs to re-organize tables for performance or garbage collection.
Copy link

Choose a reason for hiding this comment

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

Does the tables here mean tablets?

Copy link
Owner Author

Choose a reason for hiding this comment

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

No, a table here means something like SSTable.


A universe consists of a universe master and a set of tablet servers. Tablet servers are organized into tablet groups. Each tablet group serves a disjoint set of tablets for one or more databases.

A tablet group consists of replicas (tablet servers). A group uses a `Kernel` stream for leader election and commit logs persistance.
Copy link
Contributor

Choose a reason for hiding this comment

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

May you elaborate the leader election algorithm here? "Using a stream" is too abstract to map into implementation :)

Copy link
Owner Author

Choose a reason for hiding this comment

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

Well, I haven't designed that yet 🤣

@huachaohuang
Copy link
Owner Author

Closed in favor of #361.

@huachaohuang huachaohuang deleted the luna-rfc branch February 8, 2022 09:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants