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

Function partition_deterministic

nodedb-cluster/src/distributed_join.rs:176–185  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

174
175 #[test]
176 fn partition_deterministic() {
177 let p1 = partition_for_key("alice", 16);
178 let p2 = partition_for_key("alice", 16);
179 assert_eq!(p1, p2);
180
181 // Different keys should (usually) get different partitions.
182 let p3 = partition_for_key("bob", 16);
183 // Not guaranteed different, but statistically likely with 16 partitions.
184 let _ = p3;
185 }
186
187 #[test]
188 fn shuffle_plan_covers_all_partitions() {

Callers

nothing calls this directly

Calls 1

partition_for_keyFunction · 0.85

Tested by

no test coverage detected