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

[feature] WAL 로그 저장 포맷 선택 및 구현 #159

Open
myyrakle opened this issue Aug 28, 2024 · 1 comment · May be fixed by #169
Open

[feature] WAL 로그 저장 포맷 선택 및 구현 #159

myyrakle opened this issue Aug 28, 2024 · 1 comment · May be fixed by #169
Assignees
Labels
feature new feature unit

Comments

@myyrakle
Copy link
Owner

에픽: #158

  1. 로그를 압축해서 크기가 너무 크지 않아야 함
  2. 직렬화/역직렬화 속도가 느리지 않아야 함
  3. 데이터가 너무 크면 분할해서 저장해야 함(보통 4K 정도?)
@wHoIsDReAmer
Copy link
Collaborator

직렬화/역직렬화 라이브러리

  • Bitcode
    채택 이유: 가볍고 빠름. 속도는 관련 라이브러리 중 매우 빠른 편에 속함

포맷

#[derive(Debug, Encode)]
struct WALEntry {
    index: u64, // 엔트리 인덱스
    entry_type: EntryType, // 엔트리 타입
    data: Vec<u8>, // 내부 데이터
    timestamp: u64, // 엔트리 생성 시간
    transaction_id: u64, // 트랜잭션 시 생성되는 sequence
}

#[derive(Debug, Encode)]
enum EntryType {
    Insert,
    Set,
    Delete,
    Checkpoint,

    TransactionBegin,
    TransactionCommit,
}

추후 구현할 WAL 스캐닝에서는 트랜잭션 시작 후 COMMIT이 발생하지 않으면 무시할 예정

@wHoIsDReAmer wHoIsDReAmer linked a pull request Nov 21, 2024 that will close this issue
3 tasks
@wHoIsDReAmer wHoIsDReAmer linked a pull request Nov 21, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new feature unit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants