| ▲ | MPSimmons 2 hours ago | |||||||||||||||||||||||||||||||
How difficult would it have been to isolate that problem if you didn't already know the SQLite subsystem it was in? This feels, to someone relatively ignorant of the SQLite / Tailscale / Antithesis architectures as a "hindsight is 20/20" kind of thing, but I'm open to learning more. | ||||||||||||||||||||||||||||||||
| ▲ | carlsverre 2 hours ago | parent [-] | |||||||||||||||||||||||||||||||
Great question! The general approach we take with transactional systems like this is to put reachability statements throughout the complex stateful machinery and then stress-test them in Antithesis. The workload I put in place does exactly that[1]. It runs a write workload from multiple processes concurrently on the same SQLite database to cause writes to build up in the WAL, and runs checkpoints concurrently. This exercises the portion of the WAL code that, from a trivial read-through, is most likely to contain bugs (and turns out, did!). Said differently, this is exactly the approach we take with all stateful transactional systems. I am only sad that I didn't do this experiment months earlier, as it would have saved Tailscale and the SQLite team a lot of time. [1]: https://github.com/antithesishq/sqlite/blob/3.51.2-instrumen... | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||