docs(tvix/store): update comment regarding reachability check
This might be more understandable. Change-Id: I91371d304a9a316a2934ce41929998eaef67e11c Reviewed-on: https://cl.tvl.fyi/c/depot/+/8416 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
parent
60751b70eb
commit
6edc2182d1
1 changed files with 6 additions and 9 deletions
|
@ -146,15 +146,12 @@ impl<DS: DirectoryService + Send + Sync + Clone + 'static>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: We don't validate the currently received directory refers
|
// NOTE: We can't know if a directory we're receiving actually is
|
||||||
// to at least one child we already received.
|
// part of the closure, because we receive directories from the leaf nodes up to
|
||||||
// This means, we thoeretically allow uploading multiple disconnected graphs,
|
// the root.
|
||||||
// and the digest of the last element in the stream becomes the root node.
|
// The only thing we could to would be doing a final check when the
|
||||||
// For example, you can upload a leaf directory A, a leaf directory
|
// last Directory was received, that all Directories received so far are
|
||||||
// B, and then as last element a directory C that only refers to A,
|
// reachable from that (root) node.
|
||||||
// leaving B disconnected.
|
|
||||||
// At some point, we might want to populate a datastructure that
|
|
||||||
// does a reachability check.
|
|
||||||
|
|
||||||
let dgst = directory.digest();
|
let dgst = directory.digest();
|
||||||
seen_directories_sizes.insert(dgst, directory.size());
|
seen_directories_sizes.insert(dgst, directory.size());
|
||||||
|
|
Loading…
Reference in a new issue