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

Function put_then_flush_emits_segment

nodedb/src/engine/array/flush.rs:144–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142
143 #[test]
144 fn put_then_flush_emits_segment() {
145 let dir = TempDir::new().unwrap();
146 let mut e = ArrayEngine::new(ArrayEngineConfig::new(dir.path().to_path_buf())).unwrap();
147 e.open_array(aid(), schema(), 0xCAFE).unwrap();
148 put_one(&mut e, 1, 2, 10, 1);
149 let seg = e.flush(&aid(), 7).unwrap().expect("non-empty flush");
150 assert_eq!(seg.level, 0);
151 assert_eq!(seg.tile_count, 1);
152 assert_eq!(seg.flush_lsn, 7);
153 assert!(e.store(&aid()).unwrap().manifest().segments.len() == 1);
154 }
155
156 #[test]
157 fn flush_no_op_when_memtable_empty() {

Callers

nothing calls this directly

Calls 7

put_oneFunction · 0.85
open_arrayMethod · 0.80
aidFunction · 0.70
schemaFunction · 0.70
pathMethod · 0.45
expectMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected