add use_direct_io() to ReadaheadRandomAccessFile
Summary: Missing this function will cause RandomAccessFileReader not doing alignment in Direct IO mode, which introduce an IOError: invalid argument. Closes https://github.com/facebook/rocksdb/pull/1900 Differential Revision: D4601261 Pulled By: lightmark fbshipit-source-id: c3eadf1
This commit is contained in:
parent
6fa04041de
commit
a3576c7c4b
@ -543,6 +543,10 @@ class ReadaheadRandomAccessFile : public RandomAccessFile {
|
|||||||
return file_->InvalidateCache(offset, length);
|
return file_->InvalidateCache(offset, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool use_direct_io() const override {
|
||||||
|
return file_->use_direct_io();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<RandomAccessFile> file_;
|
std::unique_ptr<RandomAccessFile> file_;
|
||||||
size_t readahead_size_;
|
size_t readahead_size_;
|
||||||
|
Loading…
Reference in New Issue
Block a user