pub struct MutationWriteSet {
pub nodes: BTreeSet<NodeId>,
pub rels: BTreeSet<RelationshipId>,
pub cleared: bool,
}Expand description
Set of record ids touched by a buffered MutationEvent stream.
Built incrementally as events buffer (or in one pass at commit
time) by MutationWriteSet::extend_from_events. Used by the OCC
auto-commit path to (a) sort lock-acquire on commit, (b) validate
per-record Arc identity against the snapshot.
Fields§
§nodes: BTreeSet<NodeId>Nodes whose record was created, modified, or deleted.
rels: BTreeSet<RelationshipId>Relationships whose record was created, modified, or deleted.
cleared: booltrue if the stream contained a MutationEvent::Clear. A
clear invalidates any per-record check — the writer must
fall back to a full-graph commit (or fail under OCC).
Implementations§
Source§impl MutationWriteSet
impl MutationWriteSet
pub fn new() -> Self
Sourcepub fn extend_from_events<'a>(
&mut self,
events: impl IntoIterator<Item = &'a MutationEvent>,
)
pub fn extend_from_events<'a>( &mut self, events: impl IntoIterator<Item = &'a MutationEvent>, )
Walk a MutationEvent stream and accumulate every touched
record id. Variants that touch two records (e.g.
CreateRelationship mentions both src and dst plus the
new relationship) record both nodes — the writer’s view of
those nodes’ adjacency changed too.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for MutationWriteSet
impl Clone for MutationWriteSet
Source§fn clone(&self) -> MutationWriteSet
fn clone(&self) -> MutationWriteSet
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more