Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: Implement WAL-based RaftLog storage #16776

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Nov 6, 2024

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

Summary

feat: Implement WAL-based RaftLog storage

Replace sled-based storage with a dedicated WAL implementation optimized
for Raft Log operations. The new implementation provides:

Performance improvements:

  • Non-blocking batched fdatasync
  • FILO caching for latest logs (configurable size/count)
  • ~0.5ms write latency

Compatibility:

  • Backward compatible with existing data format
  • Auto-upgrades from V003 to V004 format on startup
  • Supports rolling upgrades (no protocol changes)
  • databend-metactl supports both V003/V004 import/export

Technical details:

  • New storage format: V004
  • Optimized specifically for Raft Log operations
  • Preserves all existing functionality

Tests

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

Type of change

  • New Feature (non-breaking change which adds functionality)

Related Issues


This change is Reviewable

@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Nov 6, 2024
@drmingdrmer drmingdrmer force-pushed the 165-raft-log branch 8 times, most recently from aece60b to 91aaac5 Compare November 6, 2024 14:12
Replace sled-based storage with a dedicated WAL implementation optimized
for Raft Log operations. The new implementation provides:

Performance improvements:
- Non-blocking batched fdatasync
- FILO caching for latest logs (configurable size/count)
- ~0.5ms write latency

Compatibility:
- Backward compatible with existing data format
- Auto-upgrades from V003 to V004 format on startup
- Supports rolling upgrades (no protocol changes)
- databend-metactl supports both V003/V004 import/export

Technical details:
- New storage format: V004
- Optimized specifically for Raft Log operations
- Preserves all existing functionality
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant