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

Method FirstIndex

raftwal/storage.go:252–257  ·  view source on GitHub ↗

FirstIndex returns the first index. It is typically SnapshotIndex+1.

()

Source from the content-addressed store, hash-verified

250
251// FirstIndex returns the first index. It is typically SnapshotIndex+1.
252func (w *DiskStorage) FirstIndex() (uint64, error) {
253 w.lock.Lock()
254 defer w.lock.Unlock()
255
256 return w.firstIndex(), nil
257}
258
259// Snapshot returns the most recent snapshot. If snapshot is temporarily
260// unavailable, it should return ErrSnapshotTemporarilyUnavailable, so raft

Callers 11

InitEncryptedFunction · 0.95
addEntriesMethod · 0.95
checkForCIDInEntriesMethod · 0.80
TestCalculateSnapshotFunction · 0.80
processCDCEventsMethod · 0.80
checkpointAndCloseMethod · 0.80
calculateSnapshotMethod · 0.80
TestStorageFirstIndexFunction · 0.80
TestStorageOnlySnapFunction · 0.80
TestStorageBigFunction · 0.80

Calls 3

firstIndexMethod · 0.95
LockMethod · 0.45
UnlockMethod · 0.45

Tested by 4

TestCalculateSnapshotFunction · 0.64
TestStorageFirstIndexFunction · 0.64
TestStorageOnlySnapFunction · 0.64
TestStorageBigFunction · 0.64