|
|
@ -1357,7 +1357,7 @@ Status DBImpl::SetDBOptions( |
|
|
|
file_options_for_compaction_ = fs_->OptimizeForCompactionTableWrite( |
|
|
|
file_options_for_compaction_ = fs_->OptimizeForCompactionTableWrite( |
|
|
|
file_options_for_compaction_, immutable_db_options_); |
|
|
|
file_options_for_compaction_, immutable_db_options_); |
|
|
|
versions_->ChangeFileOptions(mutable_db_options_); |
|
|
|
versions_->ChangeFileOptions(mutable_db_options_); |
|
|
|
//TODO(xiez): clarify why apply optimize for read to write options
|
|
|
|
// TODO(xiez): clarify why apply optimize for read to write options
|
|
|
|
file_options_for_compaction_ = fs_->OptimizeForCompactionTableRead( |
|
|
|
file_options_for_compaction_ = fs_->OptimizeForCompactionTableRead( |
|
|
|
file_options_for_compaction_, immutable_db_options_); |
|
|
|
file_options_for_compaction_, immutable_db_options_); |
|
|
|
file_options_for_compaction_.compaction_readahead_size = |
|
|
|
file_options_for_compaction_.compaction_readahead_size = |
|
|
@ -2357,8 +2357,8 @@ std::vector<Status> DBImpl::MultiGet( |
|
|
|
std::string* timestamp = timestamps ? &(*timestamps)[keys_read] : nullptr; |
|
|
|
std::string* timestamp = timestamps ? &(*timestamps)[keys_read] : nullptr; |
|
|
|
|
|
|
|
|
|
|
|
LookupKey lkey(keys[keys_read], consistent_seqnum, read_options.timestamp); |
|
|
|
LookupKey lkey(keys[keys_read], consistent_seqnum, read_options.timestamp); |
|
|
|
auto cfh = |
|
|
|
auto cfh = static_cast_with_check<ColumnFamilyHandleImpl>( |
|
|
|
static_cast_with_check<ColumnFamilyHandleImpl>(column_family[keys_read]); |
|
|
|
column_family[keys_read]); |
|
|
|
SequenceNumber max_covering_tombstone_seq = 0; |
|
|
|
SequenceNumber max_covering_tombstone_seq = 0; |
|
|
|
auto mgd_iter = multiget_cf_data.find(cfh->cfd()->GetID()); |
|
|
|
auto mgd_iter = multiget_cf_data.find(cfh->cfd()->GetID()); |
|
|
|
assert(mgd_iter != multiget_cf_data.end()); |
|
|
|
assert(mgd_iter != multiget_cf_data.end()); |
|
|
@ -3983,8 +3983,7 @@ SuperVersion* DBImpl::GetAndRefSuperVersion(uint32_t column_family_id) { |
|
|
|
void DBImpl::CleanupSuperVersion(SuperVersion* sv) { |
|
|
|
void DBImpl::CleanupSuperVersion(SuperVersion* sv) { |
|
|
|
// Release SuperVersion
|
|
|
|
// Release SuperVersion
|
|
|
|
if (sv->Unref()) { |
|
|
|
if (sv->Unref()) { |
|
|
|
bool defer_purge = |
|
|
|
bool defer_purge = immutable_db_options().avoid_unnecessary_blocking_io; |
|
|
|
immutable_db_options().avoid_unnecessary_blocking_io; |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
InstrumentedMutexLock l(&mutex_); |
|
|
|
InstrumentedMutexLock l(&mutex_); |
|
|
|
sv->Cleanup(); |
|
|
|
sv->Cleanup(); |
|
|
@ -5668,8 +5667,7 @@ Status DBImpl::VerifyChecksumInternal(const ReadOptions& read_options, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool defer_purge = |
|
|
|
bool defer_purge = immutable_db_options().avoid_unnecessary_blocking_io; |
|
|
|
immutable_db_options().avoid_unnecessary_blocking_io; |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
InstrumentedMutexLock l(&mutex_); |
|
|
|
InstrumentedMutexLock l(&mutex_); |
|
|
|
for (auto sv : sv_list) { |
|
|
|
for (auto sv : sv_list) { |
|
|
|