mirror of
https://github.com/matrix-construct/construct
synced 2024-11-12 13:01:07 +01:00
ircd::db: Reenable the background work cancel for shutdown sequence.
This commit is contained in:
parent
49027cc312
commit
57ed24f868
1 changed files with 9 additions and 12 deletions
21
ircd/db.cc
21
ircd/db.cc
|
@ -395,22 +395,19 @@ catch(const std::exception &e)
|
||||||
ircd::db::database::~database()
|
ircd::db::database::~database()
|
||||||
noexcept
|
noexcept
|
||||||
{
|
{
|
||||||
//rocksdb::CancelAllBackgroundWork(d, true); // true = blocking
|
rocksdb::CancelAllBackgroundWork(d.get(), true); // true = blocking
|
||||||
//throw_on_error(d->PauseBackgroundWork());
|
log.debug("'%s': closing database @ `%s'; background_errors: %lu",
|
||||||
const auto background_errors
|
|
||||||
{
|
|
||||||
property<uint64_t>(*this, rocksdb::DB::Properties::kBackgroundErrors)
|
|
||||||
};
|
|
||||||
|
|
||||||
log.debug("'%s': closing database @ `%s' (background errors: %lu)",
|
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
background_errors);
|
property<uint64_t>(*this, rocksdb::DB::Properties::kBackgroundErrors));
|
||||||
|
|
||||||
|
this->columns.clear();
|
||||||
|
log.debug("'%s': flushed columns; synchronizing...",
|
||||||
|
name);
|
||||||
|
|
||||||
sync(*this);
|
sync(*this);
|
||||||
this->columns.clear();
|
log.debug("'%s': synchronized with hardware.",
|
||||||
log.debug("'%s': closed columns; synchronized with hardware.",
|
name);
|
||||||
this->name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue