Consider preventing store corruption by default #531
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#531
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
If the system shuts down uncleanly, it's possible to corrupt the contents of /nix/store (e.g. ending up with zero-length .nix files, which invariably cause eval errors).
Describe the solution you'd like
I'd like Lix to support the fsync-store-paths option (see https://github.com/NixOS/nix/pull/7126), which I suspect was merged into Nix after Lix was forked off.
I'd also like the note in that PR whereby "Local builds can still result in non-fsynced writes to the nix store." to be addressed somehow.
Describe alternatives you've considered
I could enable sync-before-registering, but this apparently (I have not yet verified) has a large performance impact.
I believe Lix should, in the interests of correctness, default to whatever behaviour will avoid store corruption on unclean shutdown.
Additional context
I've submitted a patch that ports
fsync-store-paths