summaryrefslogtreecommitdiff
path: root/env/composite_env_wrapper.h
diff options
context:
space:
mode:
authorHans Holmberg <hans.holmberg@wdc.com>2020-06-03 14:55:43 -0700
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>2020-06-03 14:57:46 -0700
commit0f85d163e60739597ff8f08fedc397514a7365dc (patch)
treeccd7f2f4e198120972e586e6b4b18f1b01dcb975 /env/composite_env_wrapper.h
parentf005dac2d9887308dff54730e75032ef5f5b91a3 (diff)
Route GetTestDirectory to FileSystem in CompositeEnvWrappers (#6896)
Summary: GetTestDirectory implies a file system operation (it creates the default test directory if missing), so it should be routed to the FileSystem rather than the Env. Also remove the GetTestDirectory implementation in the PosixEnv, since it overrides GetTestDirectory in CompositeEnv making it impossible to override with a custom FileSystem. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6896 Reviewed By: cheng-chang Differential Revision: D21868984 Pulled By: ajkr fbshipit-source-id: e79bfef758d06dacef727c54b96abe62e78726fd
Diffstat (limited to 'env/composite_env_wrapper.h')
-rw-r--r--env/composite_env_wrapper.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/env/composite_env_wrapper.h b/env/composite_env_wrapper.h
index 0c3f73977..6e4608b73 100644
--- a/env/composite_env_wrapper.h
+++ b/env/composite_env_wrapper.h
@@ -523,7 +523,9 @@ class CompositeEnvWrapper : public Env {
return env_target_->GetThreadPoolQueueLen(pri);
}
Status GetTestDirectory(std::string* path) override {
- return env_target_->GetTestDirectory(path);
+ IOOptions io_opts;
+ IODebugContext dbg;
+ return file_system_->GetTestDirectory(io_opts, path, &dbg);
}
uint64_t NowMicros() override { return env_target_->NowMicros(); }
uint64_t NowNanos() override { return env_target_->NowNanos(); }