From a4bd140cc235194b21de40e69d64d0415b172955 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 7 Feb 2019 20:57:44 -0800 Subject: [PATCH] ircd::db: Add interruption threshold at seek call. --- ircd/db.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ircd/db.cc b/ircd/db.cc index ac49849b9..6e2d1cf3b 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -6923,10 +6923,10 @@ ircd::db::seek(database::column &c, const rocksdb::ReadOptions &opts, std::unique_ptr &it) { - const ctx::uninterruptible::nothrow ui; - if(!it) { + const ctx::uninterruptible::nothrow ui; + database &d(*c.d); rocksdb::ColumnFamilyHandle *const &cf(c); it.reset(d.d->NewIterator(opts, cf)); @@ -6941,6 +6941,8 @@ ircd::db::_seek(database::column &c, const rocksdb::ReadOptions &opts, rocksdb::Iterator &it) { + const ctx::uninterruptible ui; + #ifdef RB_DEBUG_DB_SEEK database &d(*c.d); const ircd::timer timer;