Reserve or retrieve the stable identity for a session turn. The first reserve claims the turn; a committed reservation returns only after the store's transaction commits.
(
store: &RedbChangeStore,
session_id: &str,
turn_number: u32,
now: i64,
)
| 107 | /// reserve claims the turn; a committed reservation returns only after the |
| 108 | /// store's transaction commits. |
| 109 | pub fn reserve_turn( |
| 110 | store: &RedbChangeStore, |
| 111 | session_id: &str, |
| 112 | turn_number: u32, |
| 113 | now: i64, |
| 114 | ) -> Result<StoredProvenanceTurn, JournalError> { |
| 115 | store |
| 116 | .reserve_provenance_turn(session_id, turn_number, now) |
| 117 | .map_err(|error| JournalError::store(ErrorCode::ProvenanceStore, error)) |
| 118 | } |
| 119 | |
| 120 | /// Append one durable envelope batch with generation fencing. Duplicate |
| 121 | /// event IDs re-acknowledge their original sequences; a committed batch |
no test coverage detected