0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

ircd::db: Adjust db open and close log messages for where waiting happens.

This commit is contained in:
Jason Volk 2018-04-12 22:43:42 -07:00
parent ae528af7cd
commit b5dd434e7c

View file

@ -442,7 +442,7 @@ try
fs::mkdir(path); fs::mkdir(path);
// Announce attempt before usual point where exceptions are thrown // Announce attempt before usual point where exceptions are thrown
log.debug("Opening database \"%s\" @ `%s' columns[%zu]", log.info("Opening database \"%s\" @ `%s' with %zu columns...",
this->name, this->name,
path, path,
columns.size()); columns.size());
@ -535,15 +535,15 @@ catch(const std::exception &e)
ircd::db::database::~database() ircd::db::database::~database()
noexcept noexcept
{ {
rocksdb::CancelAllBackgroundWork(d.get(), true); // true = blocking log.info("'%s': closing database @ `%s'...",
log.debug("'%s': closing database @ `%s'; background_errors: %lu",
name, name,
path, path);
property<uint64_t>(*this, rocksdb::DB::Properties::kBackgroundErrors));
rocksdb::CancelAllBackgroundWork(d.get(), true); // true = blocking
this->columns.clear(); this->columns.clear();
log.debug("'%s': flushed columns; synchronizing...", log.debug("'%s': flushed columns; background_errors: %lu; synchronizing...",
name); name,
property<uint64_t>(*this, rocksdb::DB::Properties::kBackgroundErrors));
sync(*this); sync(*this);
log.debug("'%s': synchronized with hardware.", log.debug("'%s': synchronized with hardware.",