0
0
Fork 0

Merge pull request #833 from abhinavdangeti/master

Return an error when the snapshotEpoch is invalid
This commit is contained in:
Abhinav Dangeti 2018-03-20 15:04:23 -07:00 committed by GitHub
commit a4d88f8a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -514,7 +514,7 @@ func (s *Scorch) LoadSnapshot(epoch uint64) (rv *IndexSnapshot, err error) {
snapshotKey := segment.EncodeUvarintAscending(nil, epoch)
snapshot := snapshots.Bucket(snapshotKey)
if snapshot == nil {
return nil
return fmt.Errorf("snapshot with epoch: %v - doesn't exist", epoch)
}
rv, err = s.loadSnapshot(snapshot)
return err