mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd::db: Adjust db open and close log messages for where waiting happens.
This commit is contained in:
parent
ae528af7cd
commit
b5dd434e7c
1 changed files with 11 additions and 11 deletions
22
ircd/db.cc
22
ircd/db.cc
|
@ -442,10 +442,10 @@ 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());
|
||||||
|
|
||||||
// Open DB into ptr
|
// Open DB into ptr
|
||||||
rocksdb::DB *ptr;
|
rocksdb::DB *ptr;
|
||||||
|
@ -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.",
|
||||||
|
|
Loading…
Reference in a new issue