DigiNews

Tech Watch by Johan Denoyer

← Back to articles

TIL: SQLite WAL Mode Can Lock Short-Lived Readers

Quality: 8/10 Relevance: 9/10

Summary

This article examines how SQLite's WAL mode can briefly lock short-lived read-only readers due to the -shm coordination and a default zero busy timeout. It includes a Python-based repro illustrating scenarios with WAL and no busy timeout, WAL with a timeout, and DELETE mode, and recommends using a non-zero busy timeout or switching away from WAL in rare-read scenarios.

🚀 Service construit par Johan Denoyer