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
main
Chinmay Kamat 7 years ago committed by Facebook Github Bot
parent 09e5d7af8c
commit e003d22526
  1. 7
      util/fault_injection_test_env.h

@ -68,6 +68,13 @@ class TestWritableFile : public WritableFile {
virtual Status Flush() override;
virtual Status Sync() override;
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:
FileState state_;

Loading…
Cancel
Save