rqlite/rqlite · error
load in progress
Error message
load in progress
What it means
ErrLoadInProgress is returned when a load (database restore) is already in progress and a snapshot cannot be taken. In Notify/CAS-protected snapshot paths the store inspects the Raft snapshot error and, if it indicates a load is in progress, surfaces ErrLoadInProgress (store.go:2995). Snapshots are unsafe during a restore because the database files are being replaced.
Source
Thrown at store/store.go:105
ErrWaitForFSMTimeout = errors.New("timeout waiting for fsm")
// ErrInvalidBackupFormat is returned when the requested backup format
// is not valid.
ErrInvalidBackupFormat = errors.New("invalid backup format")
// ErrBackupCASFailed is returned when we cannot acquire the backup CAS lock.
ErrBackupCASFailed = errors.New("failed to acquire backup CAS lock")
// ErrCDCEnabled is returned when CDC is already enabled.
ErrCDCEnabled = errors.New("CDC already enabled")
// ErrInvalidVacuum is returned when the requested backup format is not
// compatible with vacuum.
ErrInvalidVacuum = errors.New("invalid vacuum")
// ErrLoadInProgress is returned when a load is already in progress and the
// requested operation cannot be performed.
ErrLoadInProgress = errors.New("load in progress")
// ErrNothingNewToSnapshot is returned when a snapshot is requested but there
// are no new log entries to snapshot.
ErrNothingNewToSnapshot = errors.New("nothing new to snapshot")
// ErrNodeNotFound is returned when a node with a given ID is not found in the cluster.
ErrNodeNotFound = errors.New("node not found in cluster")
// ErrClusterNotFound is returned when a cluster should exist but does not.
ErrClusterNotFound = errors.New("cluster not found")
// ErrNoWALToSnapshot is returned when a snapshot is requested but there is no
// WAL data to snapshot. This can happen when the Raft log contains only entries
// that don't modify the database (e.g. cluster membership changes).
ErrNoWALToSnapshot = errors.New("no WAL data available for snapshot")
)
const (View on GitHub (pinned to 7586a4d1bd)
Solutions
- Delay snapshot/backup operations until the load/restore completes
- Serialize operational tasks: pause auto-snapshot schedules during planned restores
- Retry the snapshot after the load finishes
- Check load/snapshot status via node status endpoints before triggering either operation
Example fix
// before
// cron: run snapshot every minute, overlapping with /db/load
// after
if err := s.Snapshot(0); err != nil {
if errors.Is(err, store.ErrLoadInProgress) {
time.Sleep(30 * time.Second); return s.Snapshot(0) // retry after load completes
}
} Defensive patterns
Strategy: validation
Validate before calling
// don't snapshot while a load/restore is running
if loadInProgress.Load() { return errors.New("load in progress; defer snapshot") } Type guard
func isLoadInProgress(err error) bool { return errors.Is(err, store.ErrLoadInProgress) } Try / catch
if err := s.Snapshot(trailing); err != nil {
if errors.Is(err, store.ErrLoadInProgress) {
<-loadDone // wait for restore completion, then retry
return s.Snapshot(trailing)
}
return err
} Prevention
- Pause snapshot/backup schedules during restores
- Sequence ops tasks: load first, snapshot after
- Share load/snapshot state across automation tooling
- Retry snapshots with delay if racing a load
When it happens
Trigger: Calling Store.Snapshot (or triggering an auto-snapshot) while a /db/load or /boot restore operation holds the load lock; the underlying raft.Snapshot() error mentioning "load in progress" is matched by string and converted to this error.
Common situations: Scheduled snapshots or auto-backup firing during a restore window; operator running /db/load while monitoring tooling requests a snapshot; retry logic re-triggering a snapshot mid-load.
Related errors
- acquiring read lock: %w
- failed to reload Raft config: %s
- ErrQueueClosed
- ErrCASConflict
- ErrCASConflictTimeout
AI-assisted analysis of rqlite/rqlite@7586a4d1bd (2026-09-03).
Data as JSON: /api/errors/7fac66889ec5a676.
Report an issue: GitHub.