Fix FaultInjectionTestEnv to work with DirectIO
Summary: Implemented PositionedAppend() and use_direct_io() for TestWritableFile. With these changes, FaultInjectionTestEnv can be used with DirectIO enabled. Closes https://github.com/facebook/rocksdb/pull/3586 Differential Revision: D7244305 Pulled By: yiwu-arbug fbshipit-source-id: f6b7aece53daa0f9977bc684164a0693693e514c
This commit is contained in:
parent
09e5d7af8c
commit
e003d22526
@ -68,6 +68,13 @@ class TestWritableFile : public WritableFile {
|
|||||||
virtual Status Flush() override;
|
virtual Status Flush() override;
|
||||||
virtual Status Sync() override;
|
virtual Status Sync() override;
|
||||||
virtual bool IsSyncThreadSafe() const override { return true; }
|
virtual bool IsSyncThreadSafe() const override { return true; }
|
||||||
|
virtual Status PositionedAppend(const Slice& data,
|
||||||
|
uint64_t offset) override {
|
||||||
|
return target_->PositionedAppend(data, offset);
|
||||||
|
}
|
||||||
|
virtual bool use_direct_io() const override {
|
||||||
|
return target_->use_direct_io();
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FileState state_;
|
FileState state_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user