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

Function zero_index_fast_path

nodedb/src/engine/kv/engine.rs:629–638  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

627
628 #[test]
629 fn zero_index_fast_path() {
630 let mut e = make_engine();
631 let n = now();
632
633 // No indexes — PUT should work without index overhead.
634 assert!(!e.has_indexes(1, "c"));
635 e.put(1, "c", b"k", b"raw_value", 0, n, Surrogate::ZERO);
636 assert!(e.get(1, "c", b"k", n).is_some());
637 assert_eq!(e.write_amp_ratio(1, "c"), 0.0);
638 }
639
640 #[test]
641 fn drop_index_clears_entries() {

Callers

nothing calls this directly

Calls 3

nowFunction · 0.85
make_engineFunction · 0.70
putMethod · 0.45

Tested by

no test coverage detected