Skip to content

Commit

Permalink
direct io
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Sep 13, 2023
1 parent 34f2a03 commit 2dd7e30
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/utils/env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ DSN_DEFINE_string(pegasus.server,
"The encryption method to use in the filesystem. Now "
"supports AES128CTR, AES192CTR, AES256CTR and SM4CTR.");

DSN_DEFINE_bool(replication,
enable_direct_io,
false,
"Whether to enable direct I/O when download files");
DSN_TAG_VARIABLE(enable_direct_io, FT_MUTABLE);

namespace dsn {
namespace utils {

Expand Down Expand Up @@ -86,7 +80,6 @@ rocksdb::Status do_copy_file(const std::string &src_fname,
uint64_t *total_size)
{
rocksdb::EnvOptions rd_env_options;
rd_env_options.use_direct_reads = FLAGS_enable_direct_io;
std::unique_ptr<rocksdb::SequentialFile> sfile;
auto s = dsn::utils::PegasusEnv(src_type)->NewSequentialFile(src_fname, &sfile, rd_env_options);
LOG_AND_RETURN_NOT_RDB_OK(WARNING, s, "failed to open file {} for reading", src_fname);
Expand All @@ -100,7 +93,6 @@ rocksdb::Status do_copy_file(const std::string &src_fname,
remain_size = std::min(remain_size, src_file_size);

rocksdb::EnvOptions wt_env_options;
wt_env_options.use_direct_writes = FLAGS_enable_direct_io;
std::unique_ptr<rocksdb::WritableFile> wfile;
s = dsn::utils::PegasusEnv(dst_type)->NewWritableFile(dst_fname, &wfile, wt_env_options);
LOG_AND_RETURN_NOT_RDB_OK(WARNING, s, "failed to open file {} for writing", dst_fname);
Expand Down

0 comments on commit 2dd7e30

Please sign in to comment.