Add a bidirectional edge pair through the cached writer, mapping storage errors into the apply error type. This is the single edge-writing entry point shared by both insertion and edge-update application.
(
txn: &mut CachedWriteGraphTxn<'_, '_>,
inode: Option<Inode>,
flag: EdgeFlags,
source: GraphNode<NodeId>,
dest: GraphNode<NodeId>,
introduced_by: NodeId,
)
| 363 | /// This is the single edge-writing entry point shared by both insertion and |
| 364 | /// edge-update application. |
| 365 | pub(crate) fn add_edge_with_reverse( |
| 366 | txn: &mut CachedWriteGraphTxn<'_, '_>, |
| 367 | inode: Option<Inode>, |
| 368 | flag: EdgeFlags, |
| 369 | source: GraphNode<NodeId>, |
| 370 | dest: GraphNode<NodeId>, |
| 371 | introduced_by: NodeId, |
| 372 | ) -> Result<(), LocalApplyError> { |
| 373 | txn.add_edge_with_reverse(inode, flag, source, dest, introduced_by) |
| 374 | .map_err(|e| LocalApplyError::Internal { |
| 375 | message: format!("Failed to add edge pair: {}", e), |
| 376 | }) |
| 377 | } |
| 378 | |
| 379 | #[inline] |
| 380 | fn deserialize_graph_edge(bytes: &[u8; 24]) -> SerializedGraphEdge { |
no test coverage detected