From c1a2e44ce00228851e5b2752d5586f56bfac1e1d Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 19 Sep 2018 16:55:29 -0700 Subject: [PATCH] ircd::db: Mask interruption; noexcept in filter overrides. --- include/ircd/db/database/compaction_filter.h | 6 +++--- ircd/db.cc | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/ircd/db/database/compaction_filter.h b/include/ircd/db/database/compaction_filter.h index b8bcb2e23..2ba2a6f43 100644 --- a/include/ircd/db/database/compaction_filter.h +++ b/include/ircd/db/database/compaction_filter.h @@ -25,9 +25,9 @@ final database *d; db::compactor user; - const char *Name() const override; - bool IgnoreSnapshots() const override; - Decision FilterV2(const int level, const Slice &key, const ValueType v, const Slice &oldval, std::string *newval, std::string *skipuntil) const override; + const char *Name() const noexcept override; + bool IgnoreSnapshots() const noexcept override; + Decision FilterV2(const int level, const Slice &key, const ValueType v, const Slice &oldval, std::string *newval, std::string *skipuntil) const noexcept override; compaction_filter(column *const &c, db::compactor); ~compaction_filter() noexcept override; diff --git a/ircd/db.cc b/ircd/db.cc index ee9f141d4..faa7e577d 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -2409,8 +2409,10 @@ ircd::db::database::compaction_filter::FilterV2(const int level, const Slice &oldval, std::string *const newval, std::string *const skip) -const +const noexcept { + const ctx::uninterruptible::nothrow ui; + #ifdef RB_DEBUG_DB_ENV const auto typestr { @@ -2468,14 +2470,14 @@ const bool ircd::db::database::compaction_filter::IgnoreSnapshots() -const +const noexcept { return false; } const char * ircd::db::database::compaction_filter::Name() -const +const noexcept { assert(c); return db::name(*c).c_str();