diff --git a/env/env_hdfs.cc b/env/env_hdfs.cc index 5bdf03ae3e18cca0d2fbe66ebdc66d71fd1636b8..207f0815bc4c50696072ea6a50749e829b9e4b8e 100644 --- a/env/env_hdfs.cc +++ b/env/env_hdfs.cc @@ -420,7 +420,7 @@ Status HdfsEnv::NewRandomAccessFile(const std::string& fname, // create a new file for writing Status HdfsEnv::NewWritableFile(const std::string& fname, std::unique_ptr* result, - const EnvOptions& /*options*/) { + const EnvOptions& options) { result->reset(); Status s; HdfsWritableFile* f = new HdfsWritableFile(fileSys_, fname, options); @@ -590,6 +590,11 @@ Status HdfsEnv::UnlockFile(FileLock* /*lock*/) { return Status::OK(); } Status HdfsEnv::NewLogger(const std::string& fname, std::shared_ptr* result) { + // EnvOptions is used exclusively for its `strict_bytes_per_sync` value. That + // option is only intended for WAL/flush/compaction writes, so turn it off in + // the logger. + EnvOptions options; + options.strict_bytes_per_sync = false; HdfsWritableFile* f = new HdfsWritableFile(fileSys_, fname, options); if (f == nullptr || !f->isValid()) { delete f;