diff --git a/utilities/blob_db/blob_db_impl.cc b/utilities/blob_db/blob_db_impl.cc index f35bc4ac3..783c9d4ef 100644 --- a/utilities/blob_db/blob_db_impl.cc +++ b/utilities/blob_db/blob_db_impl.cc @@ -545,12 +545,7 @@ Status BlobDBImpl::CreateWriterLocked(const std::shared_ptr& bfile) { std::string fpath(bfile->PathName()); std::unique_ptr wfile; - // We are having issue that we write duplicate blob to blob file and the bug - // is related to writable file buffer. Force no buffer until we fix the bug. - EnvOptions env_options = env_options_; - env_options.writable_file_max_buffer_size = 0; - - Status s = env_->ReopenWritableFile(fpath, &wfile, env_options); + Status s = env_->ReopenWritableFile(fpath, &wfile, env_options_); if (!s.ok()) { ROCKS_LOG_ERROR(db_options_.info_log, "Failed to open blob file for write: %s status: '%s'" @@ -561,7 +556,7 @@ Status BlobDBImpl::CreateWriterLocked(const std::shared_ptr& bfile) { } std::unique_ptr fwriter; - fwriter.reset(new WritableFileWriter(std::move(wfile), env_options)); + fwriter.reset(new WritableFileWriter(std::move(wfile), env_options_)); uint64_t boffset = bfile->GetFileSize(); if (debug_level_ >= 2 && boffset) { @@ -1570,6 +1565,8 @@ std::pair BlobDBImpl::CheckSeqFiles(bool aborted) { std::pair BlobDBImpl::FsyncFiles(bool aborted) { if (aborted) return std::make_pair(false, -1); + MutexLock l(&write_mutex_); + std::vector> process_files; { ReadLock rl(&mutex_);