Merge pull request #4207 from hercules-ci/fix-RemoteStore-filterSource-deadlock
Fix RemoteStore pool deadlock in filterSource etc
This commit is contained in:
commit
ab2ef851b6
|
@ -473,9 +473,14 @@ ref<const ValidPathInfo> RemoteStore::addCAToStore(
|
||||||
worker_proto::write(*this, conn->to, references);
|
worker_proto::write(*this, conn->to, references);
|
||||||
conn->to << repair;
|
conn->to << repair;
|
||||||
|
|
||||||
conn.withFramedSink([&](Sink & sink) {
|
// The dump source may invoke the store, so we need to make some room.
|
||||||
dump.drainInto(sink);
|
connections->incCapacity();
|
||||||
});
|
{
|
||||||
|
Finally cleanup([&]() { connections->decCapacity(); });
|
||||||
|
conn.withFramedSink([&](Sink & sink) {
|
||||||
|
dump.drainInto(sink);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
auto path = parseStorePath(readString(conn->from));
|
auto path = parseStorePath(readString(conn->from));
|
||||||
return readValidPathInfo(conn, path);
|
return readValidPathInfo(conn, path);
|
||||||
|
|
Loading…
Reference in a new issue