Skip to content
Snippets Groups Projects
Commit 8c50e069 authored by Vladislav Shpilevoy's avatar Vladislav Shpilevoy
Browse files

txn: remove TXN_IS_DONE check from txn_commit()


TXN_IS_DONE was used in txn_commit() to finalize the transaction
in a case it is not finished yet. But this happens only not in
so common cases - during bootstrap and recovery. During normal
operation the transaction is always finished when WAL thread
returns it to TX thread after a disk write.

So this is a matter of journal, and should be solved here, not in
txn code with some crutch, especially in such a hot path place.

This commit makes so that after journal_write() the transaction is
always already done, i.e. txn_complete_async() was called. Nothing
changes for the normal operation mode except this is -1 'if'.

Also the commit disables snap_quorum_delay.test, which uses
internal API of replication and txn modules assuming the journal
is initialized somewhere inside. But now it is not, and it can't
be fixed in a sane way inside the test. It will be
deleted/rewritten later.

Acked-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
parent 71863597
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment