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

Method registered_change_hashes

atomic-repository/src/repository/changes.rs:391–399  ·  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

389 /// client advertises these hashes as `haves` so the server never resends a
390 /// `.change` merely because it is absent from one view's own metadata.
391 pub fn registered_change_hashes(&self) -> Result<Vec<Hash>, RepositoryError> {
392 let txn = self
393 .pristine
394 .read_txn()
395 .map_err(|e| RepositoryError::Database(e.to_string()))?;
396 txn.list_registered_changes()
397 .map(|items| items.into_iter().map(|(_, hash)| hash).collect())
398 .map_err(|e| RepositoryError::Database(e.to_string()))
399 }
400
401 /// Backfill the pristine normal-change dependency index from stored changes.
402 ///

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