Add comment from GitHub about adding to store as code comment

This commit is contained in:
John Ericson 2023-12-06 17:59:25 -05:00
parent 3df8feb3a2
commit 11f8030b0f

View file

@ -425,6 +425,19 @@ static void copyPathFromRemote(
const ValidPathInfo & info const ValidPathInfo & info
) )
{ {
// Why both stores? @thufschmitt says:
//
// > I think it's an easy (and terribly inefficient 😬) way of
// making sure that `localStore.queryRealisations` will succeed
// (which we IIRC we need later to get back some metadata about the
// path to put it in the db).
// >
// > To be honest, we shouldn't do that but instead carry the needed
// metadata in memory until the point where we need it (but that can
// come later once we're confident that this is at least correct)
//
// TODO make the above change to avoid copying excess data back and
// forth.
for (auto * store : {&destStore, &localStore}) { for (auto * store : {&destStore, &localStore}) {
/* Receive the NAR from the remote and add it to the /* Receive the NAR from the remote and add it to the
destination store. Meanwhile, extract all the info from the destination store. Meanwhile, extract all the info from the