Skip to content

Commit

Permalink
Merge pull request cockroachdb#1027 from dt/close-err
Browse files Browse the repository at this point in the history
sstable: use fixed error in Close
  • Loading branch information
dt authored Dec 23, 2020
2 parents 23ad85a + 6f499ee commit 9f77cf3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sstable/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
)

var errCorruptIndexEntry = base.CorruptionErrorf("pebble/table: corrupt index entry")
var errReaderClosed = errors.New("pebble/table: reader is closed")

const (
// Constants for dynamic readahead of data blocks. Note that the size values
Expand Down Expand Up @@ -1654,7 +1655,7 @@ func (r *Reader) Close() error {
}
}
// Make any future calls to Get, NewIter or Close return an error.
r.err = errors.New("pebble/table: reader is closed")
r.err = errReaderClosed
return nil
}

Expand Down

0 comments on commit 9f77cf3

Please sign in to comment.