diff --git a/app/nullius/execution.py b/app/nullius/execution.py index 8cea92ce0..eac5769b6 100644 --- a/app/nullius/execution.py +++ b/app/nullius/execution.py @@ -62,7 +62,8 @@ ``run.sh`` itself. ``restore`` reads those records when Nullius starts and reattaches to what is still running, waits again where it was paused, and settles what ended -while nobody was looking; one process at a time, by the runs root's lock. +while nobody was looking, once it holds the runs root's lock (``_follow``): +one web UI per runs folder. What is supported: ``docs/concepts.md``. A record is checked against the part's files and processes on the target before it is trusted (``_settle``): a part whose pid was never saved, but which was claimed or started, is followed by the pid it diff --git a/docs/concepts.md b/docs/concepts.md index 5224b7bce..9283e1b20 100644 --- a/docs/concepts.md +++ b/docs/concepts.md @@ -75,6 +75,28 @@ A count of runs leaves out the checks. The checks have a count of their own. The roots holding your runs; the same roots reopen the same workspace. Judgements belong to the job, in every workspace that holds it. +## Concurrency and failures + +Several web UIs and commands may use one profile (`NULLIUS_HOME`) at once, within the limits below. + +- Each runs folder (`RUNS_DIR`) is followed by one web UI; a second on the same folder refuses to start. Stopping a run goes through the web UI that follows it. +- A job folder has one writer at a time: `standard run`, `standard rerun` or the run itself. +- Leaderboard weights, access tokens, proofs and task flags change under their own lock. Files are replaced whole, never half written. + +Supported: + +- Nullius killed between any two writes. +- A write that fails: disk full, permission refused. +- Several requests at once in one web UI. + +Not supported: + +- Two processes changing workspaces or judgements at once. +- Permissions or ownership changed by someone else during an operation. +- A sticky or foreign-owned runs folder. +- Another program renaming, deleting or editing a workspace, run or judgement folder Nullius is writing to. +- Network filesystems' locks. +
- [Run builder](builder.md)