Can AI Write Database Internals?
ScyllaDB, Wednesday, November 18th, 2026
ScyllaDB's CEO recounts using Claude to implement the W-TinyLFU cache policy, including the gains and an MVCC invariant it missed.
ScyllaDB's CEO describes using Claude to implement the W-TinyLFU cache admission policy as a replacement for LRU, an idea filed as a GitHub issue in 2018.
A first version came quickly, but he was stuck for weeks without measurable gains until an AI code review against Caffeine and a Claude-written simulator helped.
In tests LRU then showed 1.4x more evictions, and with artificial disk delays added through FUSE, P99 latency fell from 27 ms to 6.7 ms; he also added hill climbing to tune the window size automatically.
Neither he nor Claude accounted for an MVCC invariant on eviction order, so two developers rejected the pull request; it now waits on a separate PR that bypasses MVCC for partitions without clustering keys.