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

Function open_engine

nodedb/tests/bitemporal_array_temporal_purge.rs:57–63  ·  view source on GitHub ↗

Open an engine with `flush_cell_threshold = 1` so every `put_cells` call lands in a fresh segment. This makes it easy to produce multiple system-time versions of the same coordinate in separate segments, which exercises the cross-segment retention logic in `plan.rs`.

(dir: &TempDir)

Source from the content-addressed store, hash-verified

55/// system-time versions of the same coordinate in separate segments,
56/// which exercises the cross-segment retention logic in `plan.rs`.
57fn open_engine(dir: &TempDir) -> ArrayEngine {
58 let mut cfg = ArrayEngineConfig::new(dir.path().to_path_buf());
59 cfg.flush_cell_threshold = 1;
60 let mut e = ArrayEngine::new(cfg).unwrap();
61 e.open_array(aid(), schema(), SCHEMA_HASH).unwrap();
62 e
63}
64
65fn put(e: &mut ArrayEngine, x: i64, v: i64, sys_ms: i64, lsn: u64) {
66 e.put_cells(

Calls 4

open_arrayMethod · 0.80
aidFunction · 0.70
schemaFunction · 0.70
pathMethod · 0.45

Tested by

no test coverage detected