Move a info logging out of DB Mutex
Summary: As we know, logging can be slow, or even hang for some file systems. Move one more logging out of DB mutex. Test Plan: make all check Reviewers: haobo, igor, ljin Reviewed By: igor CC: yhchiang, nkg-, leveldb Differential Revision: https://reviews.facebook.net/D17427
This commit is contained in:
parent
c9622aab77
commit
158845ba9a
@ -4034,6 +4034,9 @@ Status DBImpl::MakeRoomForWrite(bool force,
|
|||||||
new_mem = new MemTable(internal_comparator_, options_);
|
new_mem = new MemTable(internal_comparator_, options_);
|
||||||
new_superversion = new SuperVersion();
|
new_superversion = new SuperVersion();
|
||||||
}
|
}
|
||||||
|
Log(options_.info_log,
|
||||||
|
"New memtable created with log file: #%lu\n",
|
||||||
|
(unsigned long)new_log_number);
|
||||||
}
|
}
|
||||||
mutex_.Lock();
|
mutex_.Lock();
|
||||||
if (!s.ok()) {
|
if (!s.ok()) {
|
||||||
@ -4051,9 +4054,6 @@ Status DBImpl::MakeRoomForWrite(bool force,
|
|||||||
}
|
}
|
||||||
mem_ = new_mem;
|
mem_ = new_mem;
|
||||||
mem_->Ref();
|
mem_->Ref();
|
||||||
Log(options_.info_log,
|
|
||||||
"New memtable created with log file: #%lu\n",
|
|
||||||
(unsigned long)logfile_number_);
|
|
||||||
mem_->SetLogNumber(logfile_number_);
|
mem_->SetLogNumber(logfile_number_);
|
||||||
force = false; // Do not force another compaction if have room
|
force = false; // Do not force another compaction if have room
|
||||||
MaybeScheduleFlushOrCompaction();
|
MaybeScheduleFlushOrCompaction();
|
||||||
|
Loading…
Reference in New Issue
Block a user