about summary refs log tree commit diff
path: root/tvix/store/src/bin
AgeCommit message (Collapse)AuthorFilesLines
2023-05-25 r/6198 refactor(tvix/store/bin): use std::ioFlorian Klink1-3/+4
Change-Id: I3f3dc9732d90790d92268c04c75eccbe92e7e05b Reviewed-on: https://cl.tvl.fyi/c/depot/+/8634 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-05-25 r/6197 fix(tvix/store/bin): use spawn_blocking to call import_pathFlorian Klink1-10/+14
This operation is blocking, so it should be run inside a blocking tokio task. Tokio panics if it detects a blocking operation inside a non- blocking task, so cl/8619 would cause it to panic (as the GRPC clients use spawn_blocking under the hood). As spawn_blocking moves, and we can't clone `TvixStoreIO` (see cl/8614), we create a new instance of TvixStoreIO inside each loop iteration. Change-Id: I0c6548b3d4ac42d180d4c92314af8fd2b16510da Reviewed-on: https://cl.tvl.fyi/c/depot/+/8618 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2023-05-24 r/6191 feat(tvix/store): implement TvixStoreIOFlorian Klink1-39/+15
This providesEvalIO, asking given PathInfoService, DirectoryService and BlobService. Change-Id: I32f210f5a7aa8173ad9a7d53e8a5ac03619f527a Reviewed-on: https://cl.tvl.fyi/c/depot/+/8561 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su>
2023-05-23 r/6177 refactor(tvix/store/directorysvc): move from Vec<u8> to B3DigestFlorian Klink1-1/+2
This introduces a new struct, B3Digest, which internally holds a Vec<u8>, but only allows construction with 32 bytes. It also implements display, which will print the base64 representation. This should reduce some boilerplate when parsing Vec<u8>. Change-Id: Ia91aa40cb691916773abc8f93e6ed79a5fd34863 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8592 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-05-17 r/6149 refactor(tvix/store): rename import::{import_path -> ingest_path}Florian Klink1-2/+2
This distinguishes it better from the EvalIO::import_path method. Also update the docstring to explain what it does (and what it doesn't). Change-Id: I32a8b2869fa67a894df28532b22bf170961a2abf Reviewed-on: https://cl.tvl.fyi/c/depot/+/8578 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-05-11 r/6133 refactor(tvix/store): remove ChunkServiceFlorian Klink1-12/+2
Whether chunking is involved or not, is an implementation detail of each Blobstore. Consumers of a whole blob shouldn't need to worry about that. It currently is not visible in the gRPC interface either. It shouldn't bleed into everything. Let the BlobService trait provide `open_read` and `open_write` methods, which return handles providing io::Read or io::Write, and leave the details up to the implementation. This means, our custom BlobReader module can go away, and all the chunking bits in there, too. In the future, we might still want to add more chunking-aware syncing, but as a syncing strategy some stores can expose, not as a fundamental protocol component. This currently needs "SyncReadIntoAsyncRead", taken and vendored in from https://github.com/tokio-rs/tokio/pull/5669. It provides a AsyncRead for a sync Read, which is necessary to connect our (sync) BlobReader interface to a GRPC server implementation. As an alternative, we could also make the BlobReader itself async, and let consumers of the trait (EvalIO) deal with the async-ness, but this is less of a change for now. In terms of vendoring, I initially tried to move our tokio crate to these commits, but ended up in version incompatibilities, so let's vendor it in for now. Change-Id: I5969ebbc4c0e1ceece47981be3b9e7cfb3f59ad0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8551 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2023-03-19 r/6028 feat(tvix/store/bin): print store pathFlorian Klink1-0/+38
After ingestion of the contents into the store, this will use the NonCachingNARCalculationService to create a NAR stream or the contents of the path, and use our Derivation output path calculation machinery to determine the output path (using recursive hashing strategy). In a real-world scenario, we obviously want to cache these calculations, but this should be sufficient to tinker around with it. Change-Id: I9b2e69384414f0be1bdcb5a99a4bfd46e8db9932 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8317 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-03-12 r/5956 chore(tvix/store): allow(unused_mut)Florian Klink1-0/+1
When building tvix-store without default features, this variable doesn't need to be mutable. Silence the warning. Change-Id: Iec61be0064c0cef276a29ef22e5c4af3b052efe8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8267 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2023-03-10 r/5937 feat(tvix/store): move to daemon subcommand, add import subcommandFlorian Klink1-45/+106
This exposes the previous default behavior at the `tvix-store daemon` subcommand. It also adds a `tvix-store import` command, which will ingest a given path into the store. Change-Id: Ide14f1d409b9364e7f98090690c744326486e470 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8166 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-03-10 r/5936 refactor(tvix/store): move entrypoint to src/bin/tvix-store.rsFlorian Klink1-0/+106
Change-Id: Ibb83be75a2be27debd9e85b43c1b824f59e54dab Reviewed-on: https://cl.tvl.fyi/c/depot/+/8165 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>