Append one durable envelope batch with generation fencing. Duplicate event IDs re-acknowledge their original sequences; a committed batch returns only after the transaction commits.
(
store: &RedbChangeStore,
id: ProvenanceId,
expected_generation: u64,
batch: &[(&str, &[u8])],
now: i64,
)
| 121 | /// event IDs re-acknowledge their original sequences; a committed batch |
| 122 | /// returns only after the transaction commits. |
| 123 | pub fn append_envelopes( |
| 124 | store: &RedbChangeStore, |
| 125 | id: ProvenanceId, |
| 126 | expected_generation: u64, |
| 127 | batch: &[(&str, &[u8])], |
| 128 | now: i64, |
| 129 | ) -> Result<Vec<StoredProvenanceEnvelope>, JournalError> { |
| 130 | owner_failpoint("before-envelope-commit"); |
| 131 | let stored = store |
| 132 | .append_provenance_envelopes(id, expected_generation, batch, now) |
| 133 | .map_err(|error| JournalError::store(ErrorCode::ProvenanceStore, error))?; |
| 134 | owner_failpoint("after-envelope-commit"); |
| 135 | Ok(stored) |
| 136 | } |
| 137 | |
| 138 | /// Freeze the journal frontier and persist one recoverable checkpoint |
| 139 | /// attempt, with the legacy `reuse_frozen_changes` recovery: a previous |
no test coverage detected