Skip to content
Snippets Groups Projects
Commit d94eb857 authored by Ilya Verbin's avatar Ilya Verbin Committed by Vladimir Davydov
Browse files

box: fix rollback of read-only transaction statements

Existence of txn_commit_ro_stmt assumes there is txn_rollback_ro_stmt,
but it does not exist. Instead, currently we use txn_rollback_stmt, which
has nothing to do with 'ro' statements, and will just rollback the
currently running normal statement.

As an example, consider box_index_iterator. It calls txn_begin_ro_stmt,
which does not produce any artefacts in an existing `struct txn`. But in
case of the iterator creation fail it calls txn_rollback_stmt, which will
rollback the currently being executed 'rw' statement.

Drop txn_commit_ro_stmt and introduce txn_end_ro_stmt, which is called
regardless of 'ro' statement result.

NO_DOC=bugfix

Closes #5501
parent 9a5188b1
No related branches found
No related tags found
No related merge requests found
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