merge/resync-2025-12-05 #11

Merged
ahuston-0 merged 4 commits from merge/resync-2025-12-05 into add-gitea-pulls 2025-12-05 15:59:42 -05:00
Showing only changes of commit 20a0857660 - Show all commits

View File

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