Periodically close RemoteStore connections

[?]
Sep 14, 2017, 4:16 PM
LENA4O2VYLVQ7HWUAVHPAMD4NM2CB7LUOS2IYGN2L27EFHKMIZYAC

Dependencies

  • [2] 7LWB2J2Z Periodically clear orphaned build steps
  • [3] DYVETV7L hydra-queue-runner: Allow multiple concurrent daemon connections
  • [*] 24BMQDZA Start of single-process hydra-queue-runner
  • [*] PDI5YPBY Use store-api for binary cache instantiation
  • [*] ENXUSMSV Make concurrency more robust

Change contents

  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 11
    [6.24]
    [7.19]
    #include "remote-store.hh"
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 818
    [3.74]
    [3.74]
    localParams["max-connection-age"] = "600";
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 892
    [2.1641]
    [2.1641]
    }
    }
    }).detach();
    /* Make sure that old daemon connections are closed even when
    we're not doing much. */
    std::thread([&]() {
    while (true) {
    sleep(10);
    try {
    if (auto remoteStore = getDestStore().dynamic_pointer_cast<RemoteStore>())
    remoteStore->flushBadConnections();
    } catch (std::exception & e) {
    printMsg(lvlError, format("connection flush thread: %1%") % e.what());