RandomAccessFileReader should not inherit RandomAccessFile
Summary: RandomAccessFileReader unnecessarily inherited RandomAccessFile, which can introduce unnecessarily extra costs. Remove it. Test Plan: Run all existing tests Reviewers: yhchiang, anthony, igor, kradhakrishnan, rven, IslamAbdelRahman Reviewed By: IslamAbdelRahman Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D47409
This commit is contained in:
parent
03dd8f3ca7
commit
d746eaad5e
@ -617,13 +617,13 @@ void BlockBasedTable::SetupForCompaction() {
|
||||
case Options::NONE:
|
||||
break;
|
||||
case Options::NORMAL:
|
||||
rep_->file->Hint(RandomAccessFile::NORMAL);
|
||||
rep_->file->file()->Hint(RandomAccessFile::NORMAL);
|
||||
break;
|
||||
case Options::SEQUENTIAL:
|
||||
rep_->file->Hint(RandomAccessFile::SEQUENTIAL);
|
||||
rep_->file->file()->Hint(RandomAccessFile::SEQUENTIAL);
|
||||
break;
|
||||
case Options::WILLNEED:
|
||||
rep_->file->Hint(RandomAccessFile::WILLNEED);
|
||||
rep_->file->file()->Hint(RandomAccessFile::WILLNEED);
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
|
@ -46,7 +46,7 @@ class SequentialFileReader {
|
||||
SequentialFile* file() { return file_.get(); }
|
||||
};
|
||||
|
||||
class RandomAccessFileReader : public RandomAccessFile {
|
||||
class RandomAccessFileReader {
|
||||
private:
|
||||
std::unique_ptr<RandomAccessFile> file_;
|
||||
Env* env_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user