Skip to content
Snippets Groups Projects
Commit ce5752ce authored by Nikita Pettik's avatar Nikita Pettik Committed by Nikita Pettik
Browse files

txm: rollback all statements related to space on alter

There was a bug that led to dirty read after space alter. For the
simplicity sake imagine following setup:

-- space 's' is empty
tx1:begin()
tx1('s:replace{2}')
s:alter({format = format})
s:select{}

Last select returns tuple {2}, however transaction tx1 hasn't been
committed. This happens due to the fact that during alter operation we
create new space, swap all unchanged parts of old space and then delete
old space. During removal of old space we also clean-up all stories
related to it. In turn story destruction may make dirty tuple clean in
case it remains in the index. In the previous implementation there was
no removal of uncommitted tuples from corresponding indexes. So let's
rollback all changes happened to the space right in time of alter. It is
legal since DDL operation anyway aborts ALL other transactions.

Closes #6318
Closes #6263
parent 68ee11a7
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