Skip to content

Commit

Permalink
Compatible with rocksdb 5.18 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
whoiami authored Jun 5, 2020
1 parent 2eca788 commit ae38f5b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/db_checkpoint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,14 @@ Status DBCheckpointImpl::CreateCheckpointWithFiles(
}
}
if (s.ok() && !current_fname.empty() && !manifest_fname.empty()) {
// 5.17.2 Createfile with new argv use_fsync
#if (ROCKSDB_MAJOR < 5 || (ROCKSDB_MAJOR == 5 && ROCKSDB_MINOR < 17))
s = CreateFile(db_->GetEnv(), full_private_path + current_fname,
manifest_fname.substr(1) + "\n");
#else
s = CreateFile(db_->GetEnv(), full_private_path + current_fname,
manifest_fname.substr(1) + "\n", false);
#endif
}
// Log(db_->GetOptions().info_log,
// "Number of log files %" ROCKSDB_PRIszt, live_wal_files.size());
Expand Down

0 comments on commit ae38f5b

Please sign in to comment.