wal-thread-safety-stranded-by-callers

Status: IN

The WAL carefully serializes all mutations (append, append_batch, checkpoint, truncate) under a threading.Lock, but both callers that depend on it have no synchronization for their own shared state: the LSM tree mutates _memtable, _sstables, and _immutable_memtables without any locking or atomic swaps, and _sstables specifically is mutated by both flush (append) and compact (full replacement) concurrently — the lock protects the log but not the data structures built from it.

JSON