MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / checkBackupReadTsAdvanced

Function checkBackupReadTsAdvanced

worker/backup.go:100–111  ·  view source on GitHub ↗

checkBackupReadTsAdvanced returns an error if readTs does not advance the backup chain past latestManifest. A regressed ReadTs means the cluster's timestamp counter went backwards (typically because Zero state was wiped or rebuilt while this backup chain was still active). The new posting list KVs w

(latestManifest *Manifest, readTs uint64)

Source from the content-addressed store, hash-verified

98// are silently dropped at restore, corrupting indexes. Callers should require
99// forceFull to start a new chain when this triggers.
100func checkBackupReadTsAdvanced(latestManifest *Manifest, readTs uint64) error {
101 if latestManifest.Type == "" {
102 return nil
103 }
104 if readTs > latestManifest.ValidReadTs() {
105 return nil
106 }
107 return errors.Errorf("backup read_ts (%d) is not greater than the latest "+
108 "manifest's read_ts (%d); this usually means Zero state was reset or "+
109 "rebuilt while this backup chain was active. Use \"forceFull\" to "+
110 "start a new chain.", readTs, latestManifest.ValidReadTs())
111}
112
113type MasterManifest struct {
114 Manifests []*Manifest

Callers 2

ProcessBackupRequestFunction · 0.85

Calls 2

ValidReadTsMethod · 0.80
ErrorfMethod · 0.45

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…