duplicate info from the sqlite database as xattrs #298
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#298
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?
store database corruption is suffering. the store should be the ultimate source of truth and anything outside of it should be restorable from it.
we've agreed on this before but not written it down
One of the pre-requisite:
.drv
.cc @pennae
this has some unfortunate interactions with user-specified xattrs, which we probably should support and definitely keep in mind while designing this. xattrs are very nice but the interface is truly horrid. for example, did you know that xfs will you set multiple gigabytes worth of xattrs on an inode but cannot ever return more than about 10000 xattr names, which in total cannot cover more than 650MB? did you know that ext4 will impose mkfs-option-dependent limits on xattr sizes? if we want to use xattrs we will have to be sure that we alone set xattrs on that inode, or things get very messy very quickly.
realistically that means we can either do store metadata xattrs or full user xattrs, but never both. adding an additional layer to store paths (giving eg
out=/nix/store/gibberish-hello-8.4/content
) would likely be a breaking change and make the store measurable less efficient. we could disallow user xattrs on$out
exactly but not restrict them for subpaths, which should be very reasonable for almost any use.once we have that we can link each store path to its deriver via xattr, and likewise each CA realisation to its source. signature information and other metadata can go into that too, reference information may need a fallback to be dumped into a file instead though (if we otherwise exceed xattr size limits). at that point we're very close to maintaining a shadow hierarchy of metadata files, but xattrs do offer tangible performance benefits (and, importantly for ext4, do not use an inode). having the fallback will allow us to support filesystems that don't have xattrs though, which may or not actually be necessary.
hmmm. so i think it might be reasonable to say the top level item of a nar may not have xattrs, and this probably wouldn't make anyone cry too much, right?
yes, that would be a corollary. especially since the store path root is usually to be considered equivalent to
/
,/usr
, or/opt
on an FHS distro, which no single thing can reasonably expect to be able to set xattrs on.