Skip to content

fix(wal): native columnar recovery, database envelope, and shutdown purge#173

Merged
xe-nvdk merged 1 commit intomainfrom
fix/wal-columnar-recovery
Jan 30, 2026
Merged

fix(wal): native columnar recovery, database envelope, and shutdown purge#173
xe-nvdk merged 1 commit intomainfrom
fix/wal-columnar-recovery

Conversation

@xe-nvdk
Copy link
Copy Markdown
Member

@xe-nvdk xe-nvdk commented Jan 30, 2026

Summary

  • WAL reader handles both row and columnar entry formats natively — no row-conversion roundtrip during recovery
  • Database name stored in WAL entries via envelope format (0x01 marker + db name length + db name), enabling correct database routing on recovery
  • AppendRawWithMeta builds WAL entries in a single allocation (was copying ~104KB payload per entry, causing throughput to drop from 4.6M to 400K logs/sec)
  • WAL files purged on clean shutdown after buffer flush — prevents duplicate recovery on restart
  • Fixed _database/_measurement key mismatch in row-based WAL recovery callback

Test plan

  • go build ./cmd/... ./internal/... compiles
  • go test ./internal/wal/... passes
  • Manual: ingest with WAL enabled → stop → restart → count matches (no duplicates)
  • Manual: ingest with WAL enabled → kill -9 → restart → data recovered from WAL

…urge

- WAL reader now handles both row and columnar entry formats natively,
  eliminating the row-conversion roundtrip during recovery
- Database name is stored in WAL entries via an envelope format
  (0x01 marker + db name), enabling correct routing on recovery
- AppendRawWithMeta builds WAL entries in a single allocation to avoid
  copying the ~104KB payload (fixes throughput regression)
- WAL files are purged on clean shutdown after buffer flush, preventing
  duplicate recovery on restart
- Fixed _database/_measurement key mismatch in row-based WAL recovery
@xe-nvdk xe-nvdk merged commit 282dd72 into main Jan 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant