Skip to main content

commit_topology_aware

Function commit_topology_aware 

Source
pub fn commit_topology_aware(
    staged: RewriteBatch,
    project_dir: &Path,
) -> Result<Option<u64>, GfError>
Expand description

Commit staged, bumping each affected generation first (see the module docs for why bump-before-commit is the only sound order). Edge topology advances only topology; node topology advances topology and search; node properties advance only search.

Returns Some(new_generation) when the batch bumped, None otherwise — the caller tags an adjacency delta segment (#765) with the returned value rather than re-reading the counter (which a concurrent bump could have advanced).

§Errors

Returns GfError::Storage on bump or rename failure. A bump followed by a failed commit leaves the counter advanced — safe (the index reads as stale), see the crash-safety invariant.