rqlite/rqlite · error
no full snapshot found before snapshot %s
Error message
no full snapshot found before snapshot %s
What it means
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.
Source
Thrown at snapshot/snapshot.go:424
snap := ss.items[idx]
// If the requested snapshot is full, return its DB file and any WAL files.
if snap.typ == Full {
return snap.dbFile, snap.walFiles, nil
}
// The requested snapshot is incremental. Walk backward to find the
// nearest full snapshot, then collect WAL files from the full snapshot
// and all incremental snapshots up to and including the requested one.
fullIdx := -1
for i := idx - 1; i >= 0; i-- {
if ss.items[i].typ == Full {
fullIdx = i
break
}
}
if fullIdx < 0 {
return nil, nil, fmt.Errorf("no full snapshot found before snapshot %s", id)
}
dbFile = ss.items[fullIdx].dbFile
for i := fullIdx; i <= idx; i++ {
walFiles = append(walFiles, ss.items[i].walFiles...)
}
return dbFile, walFiles, nil
}
// indexOf returns the index of the snapshot with the given ID.
// If no snapshot is found, it returns -1.
func (ss SnapshotSet) indexOf(id string) int {
for i, snapshot := range ss.items {
if snapshot.id == id {
return i
}
}
return -1View on GitHub (pinned to 7586a4d1bd)
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
Defensive patterns
Strategy: validation
Validate before calling
ss, err := catalog.Scan(dir)
if err == nil {
idx := ss.IndexOf(id)
if idx >= 0 && !hasFullBefore(ss, idx) {
return fmt.Errorf("snapshot %s has no full base", id)
}
} Try / catch
dbFile, wals, err := catalog.ResolveFiles(id)
if err != nil && strings.Contains(err.Error(), "no full snapshot found") {
// resolve the latest snapshot instead, or restore the missing base
return err
} Prevention
- 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
When it happens
Trigger: 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).
Common situations: Full snapshot removed by manual cleanup while incrementals remain; retention policy dropping the base; requesting a stale snapshot ID after the store was rebuilt.
Related errors
- snapshot sink already open
- snapshot sink not open
- no more data expected
- snapshot install incomplete
- snapshot install header invalid
AI-assisted analysis of rqlite/rqlite@7586a4d1bd (2026-09-03).
Data as JSON: /api/errors/96cab97995ae12ad.
Report an issue: GitHub.