diff options
author | Florian Klink <flokli@flokli.de> | 2023-04-03T20·36+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-04-07T09·35+0000 |
commit | 6edc2182d113f325d6990684b750707e60123e58 (patch) | |
tree | 9516e050a4aff4cdad7c339a53a982bff52e7870 /tvix | |
parent | 60751b70ebcfcac031ba77234338c460cd3416e6 (diff) |
docs(tvix/store): update comment regarding reachability check r/6077
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
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/store/src/proto/grpc_directoryservice_wrapper.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tvix/store/src/proto/grpc_directoryservice_wrapper.rs b/tvix/store/src/proto/grpc_directoryservice_wrapper.rs index 73036229208c..35af132215e9 100644 --- a/tvix/store/src/proto/grpc_directoryservice_wrapper.rs +++ b/tvix/store/src/proto/grpc_directoryservice_wrapper.rs @@ -146,15 +146,12 @@ impl<DS: DirectoryService + Send + Sync + Clone + 'static> } } - // TODO: We don't validate the currently received directory refers - // to at least one child we already received. - // This means, we thoeretically allow uploading multiple disconnected graphs, - // and the digest of the last element in the stream becomes the root node. - // For example, you can upload a leaf directory A, a leaf directory - // B, and then as last element a directory C that only refers to A, - // leaving B disconnected. - // At some point, we might want to populate a datastructure that - // does a reachability check. + // NOTE: We can't know if a directory we're receiving actually is + // part of the closure, because we receive directories from the leaf nodes up to + // the root. + // The only thing we could to would be doing a final check when the + // last Directory was received, that all Directories received so far are + // reachable from that (root) node. let dgst = directory.digest(); seen_directories_sizes.insert(dgst, directory.size()); |