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
Showing
- changelogs/unreleased/gh-6263-fix-dirty-read-after-alter.md 3 additions, 0 deletionschangelogs/unreleased/gh-6263-fix-dirty-read-after-alter.md
- src/box/memtx_tx.c 19 additions, 14 deletionssrc/box/memtx_tx.c
- test/box/tx_man.result 111 additions, 0 deletionstest/box/tx_man.result
- test/box/tx_man.test.lua 45 additions, 0 deletionstest/box/tx_man.test.lua
Loading
Please register or sign in to comment