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)
| 98 | // are silently dropped at restore, corrupting indexes. Callers should require |
| 99 | // forceFull to start a new chain when this triggers. |
| 100 | func 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 | |
| 113 | type MasterManifest struct { |
| 114 | Manifests []*Manifest |
searching dependent graphs…