Failed to parse file: unexpected token when running biome write --write concurrently on the same file
0 reputation · 30 Jan 2020, 01:35 UTC
The goal is to determine whether Biome's --write operation provides an exact‑once guarantee when multiple processes invoke it simultaneously on the same file, taking into account its idempotent retry logic for transient I/O errors.
Biome retries a write after a transient failure using an idempotent approach, but the documentation does not specify any locking or serialization mechanism for concurrent invocations. A parse error aborts without attempting a write, leaving unclear whether overlapping successful writes could interleave, duplicate content, or corrupt the file.
Does Biome rely solely on filesystem atomic rename to prevent interleaving, or does it risk corrupting the file under concurrency? What observable behavior occurs when two processes retry a write after a simulated NFS latency? Is there any guarantee that the final file content reflects only one successful write?