MCPcopy
hub / github.com/dgraph-io/dgraph / getEntry

Method getEntry

raftwal/log.go:146–153  ·  view source on GitHub ↗

getEntry gets the entry at the slot idx.

(idx int)

Source from the content-addressed store, hash-verified

144
145// getEntry gets the entry at the slot idx.
146func (lf *logFile) getEntry(idx int) entry {
147 if lf == nil {
148 return emptyEntry
149 }
150 x.AssertTrue(idx < maxNumEntries)
151 offset := idx * entrySize
152 return entry(lf.Data[offset : offset+entrySize])
153}
154
155// GetRaftEntry gets the entry at the index idx, reads the data from the appropriate
156// offset and converts it to a raftpb.Entry object.

Callers 11

GetRaftEntryMethod · 0.95
firstIndexMethod · 0.95
firstEmptySlotMethod · 0.95
lastEntryMethod · 0.95
slotGeMethod · 0.95
getLogFilesFunction · 0.80
truncateEntriesUntilMethod · 0.80
AddEntriesMethod · 0.80
firstIndexMethod · 0.80
LastIndexMethod · 0.80
seekEntryMethod · 0.80

Calls 2

AssertTrueFunction · 0.92
entryTypeAlias · 0.85

Tested by

no test coverage detected