mirror of
https://github.com/matrix-construct/construct
synced 2025-03-14 05:20:17 +01:00
ircd:Ⓜ️:vm: Move the write_prepare/transaction allocation earlier.
This commit is contained in:
parent
84fea17624
commit
b2bb4b1be6
1 changed files with 8 additions and 1 deletions
|
@ -758,6 +758,14 @@ ircd::m::vm::execute_pdu(eval &eval,
|
|||
assert(sequence::retired < sequence::get(eval));
|
||||
sequence::committed = sequence::get(eval);
|
||||
|
||||
// Allocate transaction; discover shared-sequenced evals.
|
||||
if(likely(opts.phase[phase::INDEX]))
|
||||
{
|
||||
const ctx::critical_assertion ca;
|
||||
write_prepare(eval, event);
|
||||
}
|
||||
|
||||
// Transaction composition.
|
||||
if(likely(opts.phase[phase::INDEX]))
|
||||
{
|
||||
const scope_restore eval_phase
|
||||
|
@ -765,7 +773,6 @@ ircd::m::vm::execute_pdu(eval &eval,
|
|||
eval.phase, phase::INDEX
|
||||
};
|
||||
|
||||
write_prepare(eval, event);
|
||||
write_append(eval, event);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue