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

Method append

nodedb-raft/src/log.rs:125–129  ·  view source on GitHub ↗

Append a single entry proposed by the leader.

(&mut self, entry: LogEntry)

Source from the content-addressed store, hash-verified

123
124 /// Append a single entry proposed by the leader.
125 pub fn append(&mut self, entry: LogEntry) -> Result<()> {
126 self.storage.append(std::slice::from_ref(&entry))?;
127 self.entries.push(entry);
128 Ok(())
129 }
130
131 /// Truncate entries from `index` onward (inclusive).
132 fn truncate_from(&mut self, index: u64) {

Callers 13

append_entriesMethod · 0.45
append_and_retrieveFunction · 0.45
entries_rangeFunction · 0.45
conflict_detectionFunction · 0.45
snapshot_compactionFunction · 0.45
become_leaderMethod · 0.45
proposeMethod · 0.45
write_segmentFunction · 0.45
plan_statementsFunction · 0.45

Calls 1

pushMethod · 0.45