about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-05-05T15·19+0300
committerclbot <clbot@tvl.fyi>2024-05-06T15·11+0000
commit4aff40fff8ea5857a3b677b79fde7df3cf9afc7b (patch)
treea3e6b1a28371cb4cb46c5129363ea87850c6d85f
parent75f2a1f97d80469d7a179970377b373e89d7a28a (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>
-rw-r--r--tvix/castore/src/import/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tvix/castore/src/import/mod.rs b/tvix/castore/src/import/mod.rs
index 87e2899113..05a21c9df8 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"
     );