Mehdi Akiki
Writing / Interrupted execution

Correctness when execution is interrupted

Crashes, retries, cancellation, partial progress, ownership, recovery and idempotency.

Investigations

3 parts

Async Rust under the hood

Five async Rust problems reproduced in one small tokio program: an oversized future, a future that is not Send, a blocking call, a select! loop that loses data, and a shutdown that hangs. Then the cost of async fn through dyn Trait, and cleanup when Drop cannot await.

Evidence: experiments/rust-atlas/async-symptoms/

20 parts

What survives a crash

Twenty parts on what really reaches the disk: write and the page cache, the cost of fsync, saving a file with rename, the directory fsync, torn writes, a crash simulator built from strace output, a small write-ahead log with checkpoints and recovery, SQLite journal and WAL modes, group commit, mmap, checksums and crash testing. Small programs in Rust, Python and C, with one script that reproduces every output.

Evidence: experiments/what-survives-a-crash/

Articles

Shorter pieces and reference

Older, introductory or narrower pieces on the same subject.

Browse the full archive →