Use a single BinaryCacheStore for all threads
[?]
Feb 18, 2016, 4:31 PM
EOO4EFWD2BJCGF3ZKS2QR3XDW4WHUGH2EHSOFVK6GMI5BUBZW6QQCDependencies
- [2]
GTUZLZRHAdd an S3-backed binary cache store - [3]
5AIYUMTBBasic remote building - [4]
ZM34T2NWTypo - [5]
73YR46NJhydra-queue-runner: Write directly to a binary cache - [6]
W2AOTSS6Rename class - [7]
N2NKSKHSRefactor local binary cache code into a subclass - [8]
32HHP5CWhydra-queue-runner: Support generating a signed binary cache - [9]
24BMQDZAStart of single-process hydra-queue-runner - [*]
HJOEIMLRRefactor
Change contents
- replacement in src/hydra-queue-runner/binary-cache-store.cc at line 14
BinaryCacheStore::BinaryCacheStore(ref<Store> localStore,BinaryCacheStore::BinaryCacheStore(const StoreFactory & storeFactory, - replacement in src/hydra-queue-runner/binary-cache-store.cc at line 16
: localStore(localStore): storeFactory(storeFactory) - edit in src/hydra-queue-runner/binary-cache-store.cc at line 194
auto localStore = storeFactory(); - edit in src/hydra-queue-runner/binary-cache-store.cc at line 215
auto localStore = storeFactory(); - edit in src/hydra-queue-runner/binary-cache-store.hh at line 9
/* While BinaryCacheStore is thread-safe, LocalStore and RemoteStorearen't. Until they are, use a factory to produce a thread-locallocal store. */typedef std::function<ref<Store>()> StoreFactory; - edit in src/hydra-queue-runner/binary-cache-store.hh at line 19
ref<Store> localStore; - edit in src/hydra-queue-runner/binary-cache-store.hh at line 22
StoreFactory storeFactory; - replacement in src/hydra-queue-runner/binary-cache-store.hh at line 26
BinaryCacheStore(ref<Store> localStore,BinaryCacheStore(const StoreFactory & storeFactory, - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 26
#if 0auto store = make_ref<LocalBinaryCacheStore>(getLocalStore(),"/home/eelco/Misc/Keys/test.nixos.org/secret","/home/eelco/Misc/Keys/test.nixos.org/public","/tmp/binary-cache");#endifauto store = std::make_shared<S3BinaryCacheStore>([]() { return openStore(); },"/home/eelco/Misc/Keys/test.nixos.org/secret","/home/eelco/Misc/Keys/test.nixos.org/public","nix-test-cache-3");;store->init();_destStore = store; - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 52[3.1660]→[2.747:753](∅→∅),[2.753]→[3.1357:1423](∅→∅),[3.1660]→[3.1357:1423](∅→∅),[3.1423]→[2.754:964](∅→∅),[2.964]→[3.84:139](∅→∅),[3.84]→[3.84:139](∅→∅),[3.139]→[2.965:1049](∅→∅),[2.1049]→[3.1424:1461](∅→∅),[3.195]→[3.1424:1461](∅→∅)
#if 0auto store = make_ref<LocalBinaryCacheStore>(getLocalStore(),"/home/eelco/Misc/Keys/test.nixos.org/secret","/home/eelco/Misc/Keys/test.nixos.org/public","/tmp/binary-cache");#endifauto store = make_ref<S3BinaryCacheStore>(getLocalStore(),"/home/eelco/Misc/Keys/test.nixos.org/secret","/home/eelco/Misc/Keys/test.nixos.org/public","nix-test-cache-3");store->init();return store;return ref<Store>(_destStore); - replacement in src/hydra-queue-runner/local-binary-cache-store.cc at line 5
LocalBinaryCacheStore::LocalBinaryCacheStore(ref<Store> localStore,LocalBinaryCacheStore::LocalBinaryCacheStore(const StoreFactory & storeFactory, - replacement in src/hydra-queue-runner/local-binary-cache-store.cc at line 8
: BinaryCacheStore(localStore, secretKeyFile, publicKeyFile): BinaryCacheStore(storeFactory, secretKeyFile, publicKeyFile) - replacement in src/hydra-queue-runner/local-binary-cache-store.hh at line 15
LocalBinaryCacheStore(ref<Store> localStore,LocalBinaryCacheStore(const StoreFactory & storeFactory, - replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 23
S3BinaryCacheStore::S3BinaryCacheStore(ref<Store> localStore,S3BinaryCacheStore::S3BinaryCacheStore(const StoreFactory & storeFactory, - replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 26
: BinaryCacheStore(localStore, secretKeyFile, publicKeyFile): BinaryCacheStore(storeFactory, secretKeyFile, publicKeyFile) - replacement in src/hydra-queue-runner/s3-binary-cache-store.hh at line 21
S3BinaryCacheStore(ref<Store> localStore,S3BinaryCacheStore(const StoreFactory & storeFactory, - edit in src/hydra-queue-runner/state.hh at line 349[11.6778][11.6778]
/* Destination store. */std::shared_ptr<nix::Store> _destStore;