Skip to content

Commit

Permalink
Fail checkpoint if no generation exists
Browse files Browse the repository at this point in the history
  • Loading branch information
hifi committed Jan 25, 2024
1 parent ff96dae commit a9a3d47
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,10 @@ func (db *DB) Checkpoint(ctx context.Context, mode string) (err error) {
generation, err := db.CurrentGeneration()
if err != nil {
return fmt.Errorf("cannot determine generation: %w", err)
} else if generation == "" {
return fmt.Errorf("no current generation")
}

return db.checkpoint(ctx, generation, mode)
}

Expand Down

0 comments on commit a9a3d47

Please sign in to comment.