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

Function fake_seg

nodedb/src/engine/array/compaction/picker.rs:67–76  ·  view source on GitHub ↗
(id: &str, level: u8, lsn: u64, lo: u64, hi: u64)

Source from the content-addressed store, hash-verified

65 use nodedb_array::types::TileId;
66
67 fn fake_seg(id: &str, level: u8, lsn: u64, lo: u64, hi: u64) -> SegmentRef {
68 SegmentRef {
69 id: id.into(),
70 level,
71 min_tile: TileId::snapshot(lo),
72 max_tile: TileId::snapshot(hi),
73 tile_count: 1,
74 flush_lsn: lsn,
75 }
76 }
77
78 #[test]
79 fn picker_orders_inputs_by_flush_lsn() {

Callers 1

Calls 1

snapshotFunction · 0.85

Tested by 1