mirror of
https://github.com/matrix-construct/construct
synced 2025-02-18 17:50:16 +01:00
ircd::db: Remove the row pos seek.
This commit is contained in:
parent
533d129322
commit
65f52b0610
2 changed files with 0 additions and 43 deletions
|
@ -59,7 +59,6 @@ struct ircd::db::row
|
|||
const vector_view<cell> &buf = {},
|
||||
gopts opts = {});
|
||||
|
||||
friend size_t seek(row &, const pos &);
|
||||
friend size_t seek(row &, const string_view &);
|
||||
};
|
||||
|
||||
|
|
42
ircd/db.cc
42
ircd/db.cc
|
@ -7126,48 +7126,6 @@ ircd::db::write(const row::delta *const &begin,
|
|||
write(&deltas.front(), &deltas.front() + deltas.size(), sopts);
|
||||
}
|
||||
|
||||
size_t
|
||||
ircd::db::seek(row &r,
|
||||
const pos &p)
|
||||
{
|
||||
// This frame can't be interrupted because it may have requests
|
||||
// pending in the request pool which must synchronize back here.
|
||||
const ctx::uninterruptible ui;
|
||||
|
||||
#ifdef RB_DEBUG_DB_SEEK
|
||||
const ircd::timer timer;
|
||||
#endif
|
||||
|
||||
size_t ret{0};
|
||||
ctx::latch latch{r.size()};
|
||||
for(auto &cell : r) request([&latch, &ret, &cell, &p]
|
||||
{
|
||||
ret += bool(seek(cell, p));
|
||||
latch.count_down();
|
||||
});
|
||||
|
||||
latch.wait();
|
||||
|
||||
#ifdef RB_DEBUG_DB_SEEK
|
||||
const column &c(r[0]);
|
||||
const database &d(c);
|
||||
log::debug
|
||||
{
|
||||
log, "'%s' %lu:%lu '%s' row SEEK POS %zu of %zu in %ld$us",
|
||||
name(d),
|
||||
sequence(d),
|
||||
sequence(r[0]),
|
||||
name(c),
|
||||
ret,
|
||||
r.size(),
|
||||
timer.at<microseconds>().count()
|
||||
};
|
||||
#endif
|
||||
|
||||
assert(ret <= r.size());
|
||||
return ret;
|
||||
}
|
||||
|
||||
size_t
|
||||
ircd::db::seek(row &r,
|
||||
const string_view &key)
|
||||
|
|
Loading…
Add table
Reference in a new issue