mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
ircd::db: Minor simplify.
This commit is contained in:
parent
ff7d2514a0
commit
ca1ee19a47
1 changed files with 7 additions and 15 deletions
22
ircd/db.cc
22
ircd/db.cc
|
@ -7016,28 +7016,20 @@ ircd::db::has(column &column,
|
|||
database &d(column);
|
||||
database::column &c(column);
|
||||
|
||||
// Perform a co-RP query to the filtration
|
||||
const auto k(slice(key));
|
||||
auto opts(make_opts(gopts));
|
||||
opts.read_tier = NON_BLOCKING;
|
||||
|
||||
// Perform a co-RP query to the filtration
|
||||
thread_local std::string discard;
|
||||
bool ret
|
||||
if(!d.d->KeyMayExist(opts, c, k, &discard, nullptr))
|
||||
return false;
|
||||
|
||||
const auto it
|
||||
{
|
||||
d.d->KeyMayExist(opts, c, k, &discard, nullptr)
|
||||
seek(column, key, gopts)
|
||||
};
|
||||
|
||||
if(ret)
|
||||
{
|
||||
const auto it
|
||||
{
|
||||
seek(column, key, gopts)
|
||||
};
|
||||
|
||||
ret = valid_eq(*it, key);
|
||||
}
|
||||
|
||||
return ret;
|
||||
return valid_eq(*it, key);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue