MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / registered_change_hashes

Method registered_change_hashes

atomic-repository/src/repository/changes.rs:438–446  ·  view source on GitHub ↗

Return every normal change registered in the repository's common graph. This is the authoritative object inventory for sync negotiation: changes are repository-global graph nodes, not owned by a particular view. A client advertises these hashes as `haves` so the server never resends a `.change` merely because it is absent from one view's own metadata.

(&self)

Source from the content-addressed store, hash-verified

436 /// client advertises these hashes as `haves` so the server never resends a
437 /// `.change` merely because it is absent from one view's own metadata.
438 pub fn registered_change_hashes(&self) -> Result<Vec<Hash>, RepositoryError> {
439 let txn = self
440 .pristine
441 .read_txn()
442 .map_err(|e| RepositoryError::Database(e.to_string()))?;
443 txn.list_registered_changes()
444 .map(|items| items.into_iter().map(|(_, hash)| hash).collect())
445 .map_err(|e| RepositoryError::Database(e.to_string()))
446 }
447
448 /// Backfill the pristine normal-change dependency index from stored changes.
449 ///

Callers 4

run_asyncMethod · 0.80
beginMethod · 0.80
pull_changes_implFunction · 0.80

Calls 4

read_txnMethod · 0.80
collectMethod · 0.45
into_iterMethod · 0.45

Tested by 1