1. Overall Vision of V2
V2 transforms CortexDB into a performant and stable engine with critical optimizations for production. It is divided into two sub-versions:
- V2.1: Performance foundations (compaction, Bloom filters, benchmarks, minimal cache)
- V2.2: Advanced optimizations (compression, lock-minimized reads, advanced caching)
Main objectives:
- Improve read performance
- Reduce disk space usage
- Efficiently manage a large number of SSTables
- Prepare the engine for production workloads
2. V2 Structure
V2.1 — Performance Foundations
Features:
- Multi-level compaction (fixed strategy)
- Bloom filters
- Benchmarks
- Minimal cache (index + blocks)
V2.2 — Advanced Optimizations
Features:
- Compression (LZ4 or Snappy)
- Lock-minimized reads, then lock-free if needed
- Advanced caching (LRU, stats, tuning)
3. V2 Non-Goals
- No range queries (V3)
- No prefix queries (V3)
- No TTL (V3)
- No transactions (V3)
- No CortexQL (V3 and V6)
- No vector search (V4)
- No replication (V5)
- No multi-threaded writes (V3)
4. V2 Architecture Overview
┌───────────┐
│ Client │
└─────┬─────┘
│ put(key, value)
▼
┌───────────────────┐
│ WAL │
│ (append-only log)│
└───────┬───────────┘
│ replay
▼
┌───────────────────┐
│ Memtable │
│ (with threshold)│
└───────┬───────────┘
│ flush
▼
┌───────────────────┐
│ SSTables │
│ (L0, L1, L2...) │
│ + Bloom filters │
│ + Compression │
│ + Cache │
└───────────────────┘
5. V2 Objective
At the end of V2 (V2.1 + V2.2), CortexDB becomes:
- Performant: critical optimizations implemented
- Stable: robust compaction and SSTable management
- Production-ready: capable of handling real workloads
This is the version that makes CortexDB competitive with other LSM-tree engines.