0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd:Ⓜ️:room::state: Improve log/diagnostic on rebuild.

This commit is contained in:
Jason Volk 2020-12-06 11:58:46 -08:00
parent 9a17cb08f8
commit 3b351b30f0

View file

@ -981,24 +981,24 @@ ircd::m::room::state::rebuild::rebuild(const room::id &room_id)
room::auth::passfail{true, {}} room::auth::passfail{true, {}}
}; };
if(!pass) if(likely(pass))
{ {
log::dwarning
{
log, "%s fails for present state in %s :%s",
string_view{event.event_id},
string_view{room_id},
what(fail),
};
return true;
}
auto _opts(opts); auto _opts(opts);
_opts.op = db::op::SET; _opts.op = db::op::SET;
_opts.event_idx = event_idx; _opts.event_idx = event_idx;
dbs::write(txn, event, _opts); dbs::write(txn, event, _opts);
++added; ++added;
}
log::logf
{
log, pass? log::level::DEBUG: log::level::DWARNING,
"%s in %s present state :%s",
string_view{event.event_id},
string_view{room_id},
pass? "PASS"_sv: what(fail),
};
return true; return true;
}); });