DB::Open() to flush info log after printing DB pointer
Summary: Now DB::Open() flushes info log before printing DB pointer, so it may not show up if no activity after DB open. Move log flushing from after printing options to printing DB pointer. Test Plan: make commit-prereq Reviewers: igor, IslamAbdelRahman, yhchiang, kradhakrishnan, anthony, rven Reviewed By: rven Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D47121
This commit is contained in:
parent
cecd903ad9
commit
9aca7cd6d8
@ -281,8 +281,6 @@ DBImpl::DBImpl(const DBOptions& options, const std::string& dbname)
|
|||||||
DumpDBFileSummary(db_options_, dbname_);
|
DumpDBFileSummary(db_options_, dbname_);
|
||||||
db_options_.Dump(db_options_.info_log.get());
|
db_options_.Dump(db_options_.info_log.get());
|
||||||
DumpSupportInfo(db_options_.info_log.get());
|
DumpSupportInfo(db_options_.info_log.get());
|
||||||
|
|
||||||
LogFlush(db_options_.info_log);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Will lock the mutex_, will wait for completion if wait is true
|
// Will lock the mutex_, will wait for completion if wait is true
|
||||||
@ -4495,6 +4493,8 @@ Status DB::Open(const DBOptions& db_options, const std::string& dbname,
|
|||||||
if (s.ok()) {
|
if (s.ok()) {
|
||||||
Log(InfoLogLevel::INFO_LEVEL, impl->db_options_.info_log, "DB pointer %p",
|
Log(InfoLogLevel::INFO_LEVEL, impl->db_options_.info_log, "DB pointer %p",
|
||||||
impl);
|
impl);
|
||||||
|
LogFlush(impl->db_options_.info_log);
|
||||||
|
|
||||||
*dbptr = impl;
|
*dbptr = impl;
|
||||||
} else {
|
} else {
|
||||||
for (auto* h : *handles) {
|
for (auto* h : *handles) {
|
||||||
|
Loading…
Reference in New Issue
Block a user