Store a session manifest received from another repository. Idempotent: storing the same content hash twice is a no-op. The convenience head advances to this manifest for its session ID.
(
&self,
manifest: &atomic_core::change::session::SessionManifest,
)
| 376 | /// Idempotent: storing the same content hash twice is a no-op. The |
| 377 | /// convenience head advances to this manifest for its session ID. |
| 378 | pub fn ingest_session_manifest( |
| 379 | &self, |
| 380 | manifest: &atomic_core::change::session::SessionManifest, |
| 381 | ) -> Result<Hash, RepositoryError> { |
| 382 | let mut txn = self |
| 383 | .pristine |
| 384 | .write_txn() |
| 385 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 386 | let hash = txn |
| 387 | .save_session_manifest(manifest) |
| 388 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 389 | txn.commit() |
| 390 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 391 | Ok(hash) |
| 392 | } |
| 393 | |
| 394 | /// Rebuild session indexes from stored provenance graphs. |
| 395 | /// |