mirror of
https://github.com/matrix-construct/construct
synced 2024-11-19 08:21:09 +01:00
ircd:Ⓜ️:dbs: Fix out-of-order writes of m.room.redaction of state.
This commit is contained in:
parent
3a420fb3b1
commit
a18325db07
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue