{"record":{"id":"96cab97995ae12ad","repo":"rqlite/rqlite","slug":"no-full-snapshot-found-before-snapshot-s","errorCode":null,"errorMessage":"no full snapshot found before snapshot %s","messagePattern":"no full snapshot found before snapshot (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"snapshot/snapshot.go","lineNumber":424,"sourceCode":"\tsnap := ss.items[idx]\n\n\t// If the requested snapshot is full, return its DB file and any WAL files.\n\tif snap.typ == Full {\n\t\treturn snap.dbFile, snap.walFiles, nil\n\t}\n\n\t// The requested snapshot is incremental. Walk backward to find the\n\t// nearest full snapshot, then collect WAL files from the full snapshot\n\t// and all incremental snapshots up to and including the requested one.\n\tfullIdx := -1\n\tfor i := idx - 1; i >= 0; i-- {\n\t\tif ss.items[i].typ == Full {\n\t\t\tfullIdx = i\n\t\t\tbreak\n\t\t}\n\t}\n\tif fullIdx < 0 {\n\t\treturn nil, nil, fmt.Errorf(\"no full snapshot found before snapshot %s\", id)\n\t}\n\n\tdbFile = ss.items[fullIdx].dbFile\n\tfor i := fullIdx; i <= idx; i++ {\n\t\twalFiles = append(walFiles, ss.items[i].walFiles...)\n\t}\n\treturn dbFile, walFiles, nil\n}\n\n// indexOf returns the index of the snapshot with the given ID.\n// If no snapshot is found, it returns -1.\nfunc (ss SnapshotSet) indexOf(id string) int {\n\tfor i, snapshot := range ss.items {\n\t\tif snapshot.id == id {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn -1","sourceCodeStart":406,"sourceCodeEnd":442,"githubUrl":"https://github.com/rqlite/rqlite/blob/7586a4d1bdbd9a5a80021664c5a863cd850adb60/snapshot/snapshot.go#L406-L442","documentation":"ResolveFiles resolves a snapshot ID into its DB file and WAL files by walking back to the most recent Full snapshot before it. This error means no Full snapshot exists earlier in the catalog than the requested snapshot, so its file set cannot be reconstructed.","triggerScenarios":"Calling ResolveFiles(id) for a snapshot whose chain of predecessors contains only Incremental snapshots — the full base is absent (deleted, pruned, or the ID refers to a snapshot before any full snapshot).","commonSituations":"Full snapshot removed by manual cleanup while incrementals remain; retention policy dropping the base; requesting a stale snapshot ID after the store was rebuilt.","solutions":["Resolve the latest snapshot ID instead, whose chain should include a full base","Restore the full snapshot that precedes the requested ID","Do not delete full snapshots that later incrementals depend on","Re-bootstrap the node from a valid backup if the base is unrecoverable"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"ss, err := catalog.Scan(dir)\nif err == nil {\n\tidx := ss.IndexOf(id)\n\tif idx >= 0 && !hasFullBefore(ss, idx) {\n\t\treturn fmt.Errorf(\"snapshot %s has no full base\", id)\n\t}\n}","typeGuard":null,"tryCatchPattern":"dbFile, wals, err := catalog.ResolveFiles(id)\nif err != nil && strings.Contains(err.Error(), \"no full snapshot found\") {\n\t// resolve the latest snapshot instead, or restore the missing base\n\treturn err\n}","preventionTips":["Treat full snapshots as the dependency root of the store","Resolve only recent snapshot IDs whose chain is intact","Re-snapshot fully after pruning operations"],"tags":["snapshot","chain","missing-base"],"backgroundTag":"missing-snapshot-base","analyzedSha":"7586a4d1bdbd9a5a80021664c5a863cd850adb60","analyzedAt":"2026-09-03T07:03:02.260Z","contentChangedAt":"2026-09-03T07:03:02.260Z","schemaVersion":2},"datasetVersion":"2026-09-10T12:17:11.382Z"}