Updates for negative .narinfo caching
[?]
Apr 15, 2016, 1:39 PM
US3QQSHJVDIESJAHI5WAIRHTIPEGXHVVY4EOEK7M5YPCUWKW7RAACDependencies
- [2]
RX6UB7YWBetter AWS error messages - [3]
DXFMYCNWFix build - [4]
W4W4ZTNVSome more logging - [5]
SOB276BAKeep some statistics for the binary cache stores - [6]
ZM34T2NWTypo - [7]
QSBS2ISOS3BinaryCacheStore::isValidPath(): Do a GET instead of HEAD - [8]
GTUZLZRHAdd an S3-backed binary cache store - [9]
QDEGRYZVReduce severity level of some message - [*]
24BMQDZAStart of single-process hydra-queue-runner - [*]
XLYHZUHTCache .narinfo lookups
Change contents
- edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 642[12.917][3.2053]
nested.attr("narInfoMissing", stats.narInfoMissing); - replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 90
} catch (S3Error & e) {if (e.err == Aws::S3::S3Errors::NO_SUCH_KEY) return false;throw;} catch (InvalidPath & e) {return false; - replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 144
std::string S3BinaryCacheStore::getFile(const std::string & path)std::shared_ptr<std::string> S3BinaryCacheStore::getFile(const std::string & path) - replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 159
auto now1 = std::chrono::steady_clock::now();try { - replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 161
auto result = checkAws(format("AWS error fetching ‘%s’") % path,client->GetObject(request));auto now1 = std::chrono::steady_clock::now(); - replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 163
auto now2 = std::chrono::steady_clock::now();auto result = checkAws(format("AWS error fetching ‘%s’") % path,client->GetObject(request)); - replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 166
auto res = dynamic_cast<std::stringstream &>(result.GetBody()).str();auto now2 = std::chrono::steady_clock::now(); - replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 168
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(now2 - now1).count();auto res = dynamic_cast<std::stringstream &>(result.GetBody()).str(); - replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 170[3.5230]→[2.1014:1103](∅→∅),[3.167]→[3.5367:5421](∅→∅),[2.1103]→[3.5367:5421](∅→∅),[3.85]→[3.5367:5421](∅→∅)
printMsg(lvlTalkative, format("downloaded ‘s3://%1%/%2%’ (%3% bytes) in %4% ms")% bucketName % path % res.size() % duration);auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(now2 - now1).count(); - replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 172
stats.getBytes += res.size();stats.getTimeMs += duration;printMsg(lvlTalkative, format("downloaded ‘s3://%1%/%2%’ (%3% bytes) in %4% ms")% bucketName % path % res.size() % duration); - replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 175
return res;stats.getBytes += res.size();stats.getTimeMs += duration;return std::make_shared<std::string>(res);} catch (S3Error & e) {if (e.err == Aws::S3::S3Errors::NO_SUCH_KEY) return 0;throw;} - replacement in src/hydra-queue-runner/s3-binary-cache-store.hh at line 55
std::string getFile(const std::string & path) override;std::shared_ptr<std::string> getFile(const std::string & path) override;