Skip to content

Commit

Permalink
sstable: Fix bug in dynamic readahead
Browse files Browse the repository at this point in the history
Turns out we weren't calling Prefetch() at all during sstable reader
dynamic readahead except in the very last readahead "step" before
switching to the POSIX_FADV_SEQUENTIAL file handle. Fix the if
conditional before the Prefetch() call.
  • Loading branch information
itsbilal committed Aug 31, 2021
1 parent 82dc0b1 commit 8731fd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sstable/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -1896,7 +1896,7 @@ func (r *Reader) readBlock(
base.MustExist(r.fs, r.filename, panicFataler{}, err)
}
}
if raState.sequentialFile != nil {
if raState.sequentialFile == nil {
type fd interface {
Fd() uintptr
}
Expand Down

0 comments on commit 8731fd6

Please sign in to comment.