MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / tombstone_collapses_into_ceiling

Function tombstone_collapses_into_ceiling

nodedb-array/src/query/retention.rs:524–537  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

522 /// Ceiling contains Tombstone(A) — newest outside-horizon wins.
523 #[test]
524 fn tombstone_collapses_into_ceiling() {
525 let s = schema();
526 let bytes = build_segment(vec![
527 (TileId::new(0, 100), live_tile(&s, 1, 10)),
528 (TileId::new(0, 200), tombstone_tile(&s, 1)),
529 ]);
530 let reader = SegmentReader::open(&bytes).unwrap();
531 let versions: Vec<TileEntry> = reader.tiles().to_vec();
532 let result = merge_for_retention(&versions, &reader, &s, 300).unwrap();
533 let ceiling = result.ceiling_tile.expect("ceiling must contain tombstone");
534 let kinds = ceiling_kinds(&ceiling);
535 assert_eq!(kinds.get(&1), Some(&RowKind::Tombstone));
536 assert_eq!(result.cells_carried_forward, 1);
537 }
538
539 // ── Test 5 ──────────────────────────────────────────────────────────────
540

Callers

nothing calls this directly

Calls 8

build_segmentFunction · 0.85
merge_for_retentionFunction · 0.85
ceiling_kindsFunction · 0.85
tilesMethod · 0.80
schemaFunction · 0.70
openFunction · 0.50
to_vecMethod · 0.45
expectMethod · 0.45

Tested by

no test coverage detected