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

Method apply_committed

nodedb-cluster/tests/common/calvin_test_node.rs:69–79  ·  view source on GitHub ↗
(&self, group_id: u64, entries: &[LogEntry])

Source from the content-addressed store, hash-verified

67
68impl nodedb_cluster::CommitApplier for CalvinApplier {
69 fn apply_committed(&self, group_id: u64, entries: &[LogEntry]) -> u64 {
70 if group_id == SEQUENCER_GROUP_ID {
71 let mut sm = self.state_machine.lock().unwrap_or_else(|p| p.into_inner());
72 for entry in entries {
73 if !entry.data.is_empty() {
74 sm.apply(&entry.data);
75 }
76 }
77 }
78 entries.last().map(|e| e.index).unwrap_or(0)
79 }
80}
81
82/// A cluster test node extended with sequencer Raft group support.

Callers

nothing calls this directly

Calls 4

lockMethod · 0.80
is_emptyMethod · 0.45
applyMethod · 0.45
lastMethod · 0.45

Tested by

no test coverage detected