Universal Write-Ahead Log (UWAL)
4096-byte Direct I/O sector-aligned encrypted journaling with hardware-accelerated AEAD ciphers.
The Durability vs. Encryption Dilemma
Traditional write-ahead logging either sacrifices throughput for encryption, risks leaking keys/plaintext through disk swap files, or suffers from initialization vector (IV) nonce-reuse risks during crash recovery.
The UniDB UWAL Architecture
- Direct I/O Sector Alignment (
O_DIRECT): High-throughput 4096-byte framed WAL blocks aligned strictly to physical disk sectors, bypassing OS page cache double-buffering. - Hardware AEAD Encryption: AES-256-GCM and ChaCha20-Poly1305 with zero performance degradation on modern processors.
- Zero Nonce-Reuse Guarantee: Deterministic 12-byte initialization vectors derived from Log Sequence Numbers (LSNs) and key epochs, eliminating cryptographic collision risks across restore cycles.
mlockZero-Allocation Ring: Concurrent group commit flushers memory-locked in RAM to prevent uncommitted plaintext from leaking into disk swap space.