merge/resync-2025-10-20 #10

Merged
ahuston-0 merged 2 commits from merge/resync-2025-10-20 into add-gitea-pulls 2025-10-20 21:20:58 -04:00
Showing only changes of commit dbae951443 - Show all commits

View File

@@ -103,9 +103,9 @@ static void copyClosureTo(
std::unique_lock<std::timed_mutex> sendLock(conn.machine->state->sendLock,
std::chrono::seconds(600));
conn.to << ServeProto::Command::ImportPaths;
destStore.exportPaths(missing, conn.to);
conn.to.flush();
conn.importPaths(destStore, [&](Sink & sink) {
destStore.exportPaths(missing, sink);
});
if (readInt(conn.from) != 1)
throw Error("remote machine failed to import closure");
@@ -298,12 +298,11 @@ static void copyPathFromRemote(
lambda function only gets executed if someone tries to read
from source2, we will send the command from here rather
than outside the lambda. */
conn.to << ServeProto::Command::DumpStorePath << localStore.printStorePath(info.path);
conn.to.flush();
TeeSource tee(conn.from, sink);
conn.narFromPath(localStore, info.path, [&](Source & source) {
TeeSource tee(source, sink);
extractNarData(tee, localStore.printStorePath(info.path), narMembers);
});
});
destStore.addToStore(info, *source2, NoRepair, NoCheckSigs);
}