Implement a Write-Ahead Log (WAL) key-value store with crash recovery.
Implement a Write-Ahead Log (WAL) key-value store with crash recovery.: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Create a program at /app/wal store.py that: - Stores key-value pairs in a WAL file at /data/wal.log and a state file at /data/store.json -…
The task
Create a program at `/app/wal_store.py` that: - Stores key-value pairs in a WAL file at `/data/wal.log` and a state file at `/data/store.json` - Accepts commands via stdin, one per line, until EOF - Supports these commands: - `PUT key value` — sets key to value (both strings, no spaces in key or value) - `GET key` —…
Part of ai-and/termgrade-environments.