phenotypic.sdk_.durable_writes_enabled#
- phenotypic.sdk_.durable_writes_enabled(override: bool | None = None) bool[source]#
Resolve whether the promote fsyncs before renaming.
write()returns once data is in the page cache. Withoutfsyncthe kernel may flush the rootzarr.jsonbefore the chunk data it describes, so a node crash can leave a store that passesvalid_staged_store()– metadata parses, shapes agree – while readingfill_value. That is silent wrong data, not a visible failure, and no amount of metadata validation catches it.The dominant failure mode does not need it: a SLURM timeout kills the process, and the kernel survives and flushes normally.
fsyncbuys protection only against node loss, power failure, and filesystem crash – which is exactly what a cluster job is exposed to and a laptop run is not.- Parameters:
override (bool | None) –
--durable-writes/--no-durable-writes, orNoneto auto-detect.- Returns:
Truewhen the promote should fsync.- Return type:
Note
This checks
SLURM_JOB_IDas well asSLURM_CPUS_PER_TASK.resolve_worker_count(_cli_utils.py:65-72) reads only the latter, so this is deliberately broader – not “exactly as” that helper does, which is what the spec’s §3.7 claims. A job that setsSLURM_JOB_IDwithout a per-task CPU count still gets durable writes.