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 Mar 6, 2024
1 parent db55f5a commit 5204182
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 5204182

Please sign in to comment.