MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / collect_committed_entries

Method collect_committed_entries

nodedb-raft/src/node/internal.rs:355–364  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

353 }
354
355 pub(super) fn collect_committed_entries(&mut self) {
356 let from = self.volatile.last_applied + 1;
357 let to = self.volatile.commit_index;
358 if from > to {
359 return;
360 }
361 if let Ok(entries) = self.log.entries_range(from, to) {
362 self.ready.committed_entries.extend(entries.iter().cloned());
363 }
364 }
365
366 pub(super) fn persist_hard_state(&mut self) {
367 self.ready.hard_state = Some(self.hard_state.clone());

Callers 4

become_leaderMethod · 0.80
proposeMethod · 0.80
handle_append_entriesMethod · 0.80

Calls 3

entries_rangeMethod · 0.80
extendMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected