summary refs log tree commit diff
path: root/ripple/fossil
AgeCommit message (Collapse)Author
2022-05-03ripple/fossil: make store path configurableedef
Change-Id: Ic410619a6115a7059b79593c6fade38236d4e8c1
2022-05-03ripple/fossil: use clapedef
This adds clap to all our binaries. Only add currently takes any args, but previously, the others did not reject args as they should. Change-Id: I6257fb3b218c624ee0124f6ed7313a579db88c4c
2022-05-02ripple/fossil/chunker: iterate smarteredef
This drops the manual `len <= MIN_CHUNK_SIZE` check, and instead combines it into acquiring the to-be-scanned chunk. The pointer-based design doesn't need the iterator to be enumerated from the start of the buffer, so we don't need to use take/skip. Throughput improves about 5%. Change-Id: Ic430c7afde68bf1acfba1a2137a0b8ac064176ea
2022-05-02ripple/fossil/chunker: use const computation for DISCRIMINATORedef
While `const fn` isn't permitted float computation, regular `const` is. This deals with LLVM's reluctance to inline discriminator_from_average, without forcing us to hardcode a magic number. Change-Id: Ibdbfa4c733468517a2feff1ec0deedd1d9b70d47
2022-05-02ripple/fossil/chunker: remove hasher initialisation bounds checkedef
We already check for `self.buffer.len() <= MIN_CHUNK_SIZE`, but LLVM doesn't seem to notice. This boosts throughput by 35%. Change-Id: I1a0e07d276dcc285f8dec3149a629cb6e865c286
2022-05-02ripple/fossil/chunker: factor out Chunker::cutedef
Change-Id: I4fed55703cd02833f377ed0bbc659f3fcfdb949f
2022-05-02ripple/fossil/chunker: eliminate indexing and bounds checksedef
This improves performance by ~12%. Change-Id: I5612b624da77b138fcfb44cbb439b0106580ed70
2022-05-02ripple/fossil/chunker: hardcode the discriminatoredef
This improves performance by ~17%. I had *expected* that rustc would have reduce it to a constant already, but alas. Change-Id: I5c15fe90244da64498d2d6562262db58242ffb24
2022-05-01ripple/fossil: benchmark Chunker using Criterionedef
Performance hovers around 300MiB/s on my machine. Change-Id: I387ccbf065c0b667824ede0675e6a295722f6d4b
2022-05-01ripple/fossil/chunker: DRY out super::* from the testsedef
Change-Id: I7f7c5556dda64f0055f1b6d2da37c36b5c684092
2022-05-01ripple/fossil/chunker: DRY out WINDOW_SIZEedef
Change-Id: Ib5a0bc2fb5b725dfe1f7f4557838529711407203
2022-05-01ripple/fossil/chunker: simplify and test Chunker::size_hintedef
Full test coverage for fossil/chunker! :) Change-Id: I0436a266220bbed6d85c291dcca827d1770294dd
2022-05-01ripple/fossil/chunker: remove Rolling::try_from_sliceedef
We never actually use this directly, and the resulting branch is test coverage noise. Change-Id: Id32b056ca0cd57965d829085d768012e5a9e05ce
2022-05-01ripple/fossil/chunker: test early cutoff for <= MIN_CHUNK_SIZEedef
Full test coverage for Chunker::next! Change-Id: I4f3dbad7e0a56f46d5714e0dd8e07f00ce255928
2022-05-01ripple/fossil/chunker: drop unused derivesedef
Free test coverage win! :) Change-Id: I9bab30e0f0da2810c770cbd8ba5603f0eb2b28e7
2022-05-01ripple/fossil/chunker: clarify MAX_CHUNK_SIZE testedef
Change-Id: Ia5adb5a9056fd0e9ddcd8667c56129219b9d6f52
2022-05-01ripple/fossil/chunker: handle and test boundary condition correctnessedef
This ensures that MIN_CHUNK_SIZE-sized chunks can actually be emitted, and adds tests for both MIN_CHUNK_SIZE and MAX_CHUNK_SIZE chunks. The behaviour for all cases now verifiably matches casync. Change-Id: Ie0bfaf50ec02658069da83ebb30210e6e1963de6
2022-05-01ripple/fossil/chunker: use b-strings for test dataedef
This takes up 80% less vertical space for something that isn't readable to humans to begin with. Change-Id: I04aa27755f0b8d6cdaa83d766f8bf0ecbe3b7a46
2022-04-28ripple/fossil: use to_be_bytes rather than write_u64edef
Change-Id: I7eb02482772f48ca9f486f514b89652a9c5730cd
2022-04-28ripple/fossil: ensure durability of add_pathedef
sled doesn't actually promise not to eat your data until you invoke flush. This is observable under normal circumstances as add_path occasionally just not committing anything to the store. While we're at it, ensure we're syncing the chunks file data to disk, so the database *might* actually be consistent. We're not going for full crash-correctness yet, mostly for performance and complexity reasons. Change-Id: I6cc69a013dc18cd50df26e73801b185de596565c
2022-04-28ripple/fossil: deduplicate using content-defined chunkingedef
This implements casync-style content-defined chunking and deduplication. Change-Id: I42a9b98e1140bed462a5ae1e0aba508bebc9fa0e
2022-04-28ripple/fossil/mount: don't serve short readsedef
FUSE doesn't actually respect the usual read() contract, so this resulted in us serving truncated files. Change-Id: I8bdb0bd7f03162fb78774f3f84daeefc5ba5e3b1
2022-04-28ripple/fossil: outline write_blob_inneredef
Change-Id: I1c4a5d16cf10c464f9835c961481da221aa0d12e
2022-04-26ripple/fossil: use the default sled tree for global metadata, not blobsedef
Change-Id: I358a5c354c19cc8cb0a75629758fda476629406d
2022-04-25ripple/fossil/mount: implement incremental file readsedef
Change-Id: Iae189c3107a6841bcbdd75bb57dde785f9548130
2022-04-25ripple/fossil: implement incremental blob readingedef
Change-Id: I69ae53824e149133aa6bb61dda201f972c840b1f
2022-04-25ripple/fossil: store bao outboard tree in the blob metadataedef
One step closer to genuine incremental blob reads. Change-Id: I796710820c1b69baad91a6dc65f9d7f0dee311d3
2022-04-25ripple/fossil: store blob metadata as protobufedef
Change-Id: I12c590d842471bf543f16fd21056224d8a7c0857
2022-04-24ripple/fossil/mount: implement stateful file handlesedef
This will primarily allow us to amortise metadata lookups. Change-Id: Ic92781bf1ded5af62f6e955322bb89623afb2061
2022-04-24ripple/fossil: implement io::Seek for RawBlobedef
Change-Id: I625530fe2f4db89be5889e46f0a5ed50727c8cd1
2022-04-23ripple/fossil: implement a more lightweight blob store backendedef
The sled chunk store works fine, but has pretty awful performance, since sled just doesn't make a particularly good large blob store. This change replaces it with a file-based store using sled purely as a metadata store. Adding LLVM's source tree takes about 120s before, and about 15s after. Change-Id: I5fb22ea79a006fa6bcf5351921038f57f2484112
2022-04-20ripple/fossil: prefer anyhow::Result over io::Resultedef
Change-Id: I4a94b84ef456b427422757a899fdce6198fd01a1
2022-04-19ripple/fossil: use bao to one-shot verify hashesedef
Change-Id: I77ace8ee9f69ccb92afaa0a41d69538d28f11583
2022-04-19ripple: upgrade blake3 (0.3.8 -> 1.3.1)edef
Change-Id: I75f2e0ff57e09b026fd1aaaeb86b041ddb8238f4
2022-04-19ripple/fossil: prepare for seekable, streaming blob readingedef
This implements blob reading in terms of RawBlob, a fairly naive streaming blob reader. For now, we still only use it for simple one-shot reads. Change-Id: Iecd4f926412b474ca6f3dde8c6055c0c3781301f
2022-04-19ripple/fossil: add read_write testedef
Change-Id: I88d13d9dd7055b8370706df7b3dd4479a0891399
2022-04-18ripple/fossil: use blake3::CHUNK_LEN as chunk sizeV
This will pave the way for BLAKE3 verified streaming, so we won't have to read objects into memory in their entirety. Change-Id: Ic68dee2ad81448db4969b8c423f0876f0e0272e0
2022-04-15ripple/fossil/mount: drop bmapedef
We'll never write a direct block-mapped filesystem, so this won't become relevant. Change-Id: I512ac44fc40f3969c2d54b93a1e2725628f46ed4
2022-04-15ripple/fossil/mount: move writing methods into their own sectionedef
Change-Id: Ia5b63f3be625c738c58a915bc46114cac7acc0a5
2022-04-15ripple/fossil/mount: correctly serve executable filesedef
Change-Id: I1bc7c0db7a0feeb5cb809e9382bf51816ec082c1
2022-04-15ripple/fossil/mount: rm rmdir stubedef
rmdir should be rejected with EROFS. For some reason, the initial EROFS pass missed this. Change-Id: Ib8d7b21b42fcf52e696041aa0ba41be5ab20d326
2022-04-15ripple/fossil/mount: unbreak rustfmtedef
Apparently, rustfmt bugs out if you mix triple-slash and double-slash comments on a struct literal. Change-Id: I609ac42f86875b48947766fa9d67af7ef8997b9b
2022-04-12ripple/fossil/mount: outline node handling logic from file_attr callersedef
Change-Id: I162b542d31a8120792e72957e6ffaf1bd94d9676
2022-04-12ripple/fossil/mount: support symlinksedef
Change-Id: Ic6cbb1dcee766e30140a1b027d6a80f5768865f5
2022-04-12ripple/fossil/mount: formatting nitedef
Change-Id: Iaefd449224e8799c0f304442d54309c4aa27f874
2022-04-12ripple/fossil/mount: unflagedef
Change-Id: I9128e7d5b6dd7205cf0f9c398e4c94306b044046
2022-04-12ripple/fossil/mount: serve an in-memory filesystem treeedef
Change-Id: I92073aae32bcf603799b83717635a13edbbef190
2022-04-12ripple/fossil: correctly handle the empty blobedef
Change-Id: I6a91a998063e70ec92e8239361a37e3f8033b049
2022-04-11ripple/fossil/mount: serve a small, static filesystemedef
Serve up an entirely hardcoded minimal filesystem tree, so we can see most of the FUSE plumbing working already. Change-Id: I13c4b534c8dd159d2d2e177497b33f1bec3849ad
2022-04-11ripple/fossil/mount: stub out anything we don't want to implementedef
Change-Id: I7c2f940a411346230835f1befc5d4fe384e2b67e