Whether canonical effects were ingested, independently of current view membership or vertex ownership. Registration alone is insufficient. Legacy read-only databases derive evidence once per transaction without modifying the database; writable opens persist the derived index.
(&self, id: NodeId)
| 79 | /// Legacy read-only databases derive evidence once per transaction without |
| 80 | /// modifying the database; writable opens persist the derived index. |
| 81 | pub fn was_change_applied(&self, id: NodeId) -> PristineResult<bool> { |
| 82 | if id.is_root() { |
| 83 | return Ok(false); |
| 84 | } |
| 85 | match self.txn.open_table(APPLIED_CHANGES) { |
| 86 | Ok(index) => { |
| 87 | if index.get(id.get())?.is_some() { |
| 88 | return Ok(true); |
| 89 | } |
| 90 | self.has_change_in_graph(id) |
| 91 | } |
| 92 | Err(TableError::TableDoesNotExist(_)) => { |
| 93 | if self.legacy_applied_changes.get().is_none() { |
| 94 | let ids = canonical_effect_writers( |
| 95 | &self.txn.open_multimap_table(GRAPH)?, |
| 96 | &self.txn.open_multimap_table(POSITION_ATTRS)?, |
| 97 | &self.txn.open_table(VIEW_CHANGES)?, |
| 98 | )?; |
| 99 | let _ = self.legacy_applied_changes.set(ids); |
| 100 | } |
| 101 | Ok(self |
| 102 | .legacy_applied_changes |
| 103 | .get() |
| 104 | .expect("initialized above") |
| 105 | .contains(&id.get())) |
| 106 | } |
| 107 | Err(error) => Err(error.into()), |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | impl WriteTxn<'_> { |
no test coverage detected