提交 158845ba 编写于 作者: S sdong

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
上级 c9622aab
......@@ -4034,6 +4034,9 @@ Status DBImpl::MakeRoomForWrite(bool force,
new_mem = new MemTable(internal_comparator_, options_);
new_superversion = new SuperVersion();
}
Log(options_.info_log,
"New memtable created with log file: #%lu\n",
(unsigned long)new_log_number);
}
mutex_.Lock();
if (!s.ok()) {
......@@ -4051,9 +4054,6 @@ Status DBImpl::MakeRoomForWrite(bool force,
}
mem_ = new_mem;
mem_->Ref();
Log(options_.info_log,
"New memtable created with log file: #%lu\n",
(unsigned long)logfile_number_);
mem_->SetLogNumber(logfile_number_);
force = false; // Do not force another compaction if have room
MaybeScheduleFlushOrCompaction();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册