Read committed log entries for a Raft group in the inclusive index range `[lo, hi]`. `hi` is clamped to the group's `commit_index` so callers that pass `u64::MAX` never read uncommitted entries. Used by the Calvin scheduler's rebuild path to replay sequenced transactions from the sequencer Raft log after a restart. Returns `Err(ClusterError::Raft(RaftError::LogCompacted))` if `lo` has been comp
(
&self,
group_id: u64,
lo: u64,
hi: u64,
)
| 284 | /// has been compacted into a snapshot (caller must install a snapshot |
| 285 | /// instead of replaying from log). |
| 286 | pub fn read_committed_entries( |
| 287 | &self, |
| 288 | group_id: u64, |
| 289 | lo: u64, |
| 290 | hi: u64, |
| 291 | ) -> Result<Vec<nodedb_raft::message::LogEntry>> { |
| 292 | let node = self |
| 293 | .groups |
| 294 | .get(&group_id) |
| 295 | .ok_or(ClusterError::GroupNotFound { group_id })?; |
| 296 | let entries = node.log_entries_range(lo, hi)?; |
| 297 | Ok(entries.to_vec()) |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | // Re-export LogEntry so callers of `read_committed_entries` can name the type. |
nothing calls this directly
no test coverage detected