(
graph: &impl ReadableMultimapTable<&'static [u8; 24], &'static [u8; 24]>,
attrs: &impl ReadableMultimapTable<&'static [u8; 17], &'static [u8; 13]>,
views: &impl ReadableTable<&'static [u
| 35 | } |
| 36 | |
| 37 | fn canonical_effect_writers( |
| 38 | graph: &impl ReadableMultimapTable<&'static [u8; 24], &'static [u8; 24]>, |
| 39 | attrs: &impl ReadableMultimapTable<&'static [u8; 17], &'static [u8; 13]>, |
| 40 | views: &impl ReadableTable<&'static [u8; 16], u64>, |
| 41 | ) -> PristineResult<HashSet<u64>> { |
| 42 | let mut ids = HashSet::new(); |
| 43 | for entry in graph.iter()? { |
| 44 | let (key, edges) = entry?; |
| 45 | let (owner, _, _) = decode_vertex(key.value()); |
| 46 | if owner != 0 { |
| 47 | ids.insert(owner); |
| 48 | } |
| 49 | for edge in edges { |
| 50 | let edge = super::txn::helpers::deserialize_edge(edge?.value()); |
| 51 | let writer = edge.introduced_by(); |
| 52 | if !writer.is_root() { |
| 53 | ids.insert(writer.get()); |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | for entry in attrs.iter()? { |
| 58 | let (_, events) = entry?; |
| 59 | for event in events { |
| 60 | ids.insert(decode_inode_attr_event(event?.value())?.introduced_by.get()); |
| 61 | } |
| 62 | } |
| 63 | // View membership is published only after successful ingestion in the |
| 64 | // same transaction. It also preserves completion evidence for empty |
| 65 | // changes, which have no graph or attribute effects to discover. |
| 66 | for entry in views.iter()? { |
| 67 | let (_, id) = entry?; |
| 68 | if id.value() != 0 { |
| 69 | ids.insert(id.value()); |
| 70 | } |
| 71 | } |
| 72 | ids.remove(&0); |
| 73 | Ok(ids) |
| 74 | } |
| 75 | |
| 76 | impl ReadTxn { |
| 77 | /// Whether canonical effects were ingested, independently of current |
no test coverage detected