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,
)
| 392 | /// Idempotent: storing the same content hash twice is a no-op. The |
| 393 | /// convenience head advances to this manifest for its session ID. |
| 394 | pub fn ingest_session_manifest( |
| 395 | &self, |
| 396 | manifest: &atomic_core::change::session::SessionManifest, |
| 397 | ) -> Result<Hash, RepositoryError> { |
| 398 | let mut txn = self |
| 399 | .pristine |
| 400 | .write_txn() |
| 401 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 402 | let hash = txn |
| 403 | .save_session_manifest(manifest) |
| 404 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 405 | txn.commit() |
| 406 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 407 | Ok(hash) |
| 408 | } |
| 409 | |
| 410 | /// Rebuild session indexes from stored provenance graphs. |
| 411 | /// |