0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-01 13:18:58 +02:00

ircd:Ⓜ️:dbs: Fix out-of-order writes of m.room.redaction of state.

This commit is contained in:
Jason Volk 2019-08-12 00:43:18 -07:00
parent 3a420fb3b1
commit a18325db07

View file

@ -1091,6 +1091,7 @@ ircd::m::dbs::_index_event_horizon_resolve(db::txn &txn,
_opts.event_idx = event_idx;
_opts.appendix.reset();
_opts.appendix.set(appendix::EVENT_REFS);
_opts.appendix.set(appendix::ROOM_REDACT);
_opts.event_refs = opts.horizon_resolve;
_opts.interpose = &txn;
write(txn, _event, _opts);
@ -1361,6 +1362,7 @@ ircd::m::dbs::_index_room_redact(db::txn &txn,
};
if(unlikely(!target_idx))
{
log::dwarning
{
"Redaction from '%s' missing redaction target '%s'",
@ -1368,6 +1370,12 @@ ircd::m::dbs::_index_room_redact(db::txn &txn,
target_id
};
if(opts.appendix.test(appendix::EVENT_HORIZON))
_index_event_horizon(txn, event, opts, target_id);
return;
}
char state_key_buf[event::STATE_KEY_MAX_SIZE];
const string_view &state_key
{