mirror of
https://github.com/matrix-construct/construct
synced 2024-11-12 13:01:07 +01:00
ircd:Ⓜ️:dbs: Remove requirement for opts.event_idx in prefetch().
This commit is contained in:
parent
90de5f88b8
commit
d034ac7a7b
2 changed files with 5 additions and 6 deletions
|
@ -236,9 +236,6 @@ ircd::m::dbs::prefetch(const event &event,
|
|||
const write_opts &opts)
|
||||
try
|
||||
{
|
||||
if(unlikely(opts.event_idx == 0))
|
||||
return false;
|
||||
|
||||
if(!prefetch_enable)
|
||||
return false;
|
||||
|
||||
|
|
|
@ -194,16 +194,18 @@ ircd::m::dbs::_prefetch_event_horizon_resolve(const event &event,
|
|||
const write_opts &opts)
|
||||
{
|
||||
assert(opts.appendix.test(appendix::EVENT_HORIZON_RESOLVE));
|
||||
assert(opts.event_idx != 0);
|
||||
assert(event.event_id);
|
||||
|
||||
size_t ret(0);
|
||||
if(!event.event_id)
|
||||
return ret;
|
||||
|
||||
char buf[EVENT_HORIZON_KEY_MAX_SIZE];
|
||||
assert(event.event_id);
|
||||
const string_view &key
|
||||
{
|
||||
event_horizon_key(buf, event.event_id)
|
||||
};
|
||||
|
||||
size_t ret(0);
|
||||
for(auto it(dbs::event_horizon.begin(key)); it; ++it)
|
||||
{
|
||||
const auto event_idx
|
||||
|
|
Loading…
Reference in a new issue