diff options
author | Florian Klink <flokli@flokli.de> | 2024-05-05T15·19+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-05-06T15·11+0000 |
commit | 4aff40fff8ea5857a3b677b79fde7df3cf9afc7b (patch) | |
tree | a3e6b1a28371cb4cb46c5129363ea87850c6d85f /tvix/castore/src | |
parent | 75f2a1f97d80469d7a179970377b373e89d7a28a (diff) |
fix(tvix/castore/import): assert end of stream r/8078
Once we break out with the root node, there may be no more elements in the stream. Change-Id: I6f5fc5662095aa2b2a56bcad506d25520d9ad00c Reviewed-on: https://cl.tvl.fyi/c/depot/+/11592 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/castore/src')
-rw-r--r-- | tvix/castore/src/import/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tvix/castore/src/import/mod.rs b/tvix/castore/src/import/mod.rs index 87e289911300..05a21c9df818 100644 --- a/tvix/castore/src/import/mod.rs +++ b/tvix/castore/src/import/mod.rs @@ -135,6 +135,11 @@ where }; assert!( + entries.count().await == 0, + "Tvix bug: left over elements in the stream" + ); + + assert!( directories.is_empty(), "Tvix bug: left over directories after processing ingestion stream" ); |