vinyl: fix rollback of prepared TX
Now if a prepared transaction is aborted, it expects to be the latest prepared TX in TX manager. It's not true in two cases: - The transaction failed during preparation. The TX is in partially prepared state and must rollback all the changes it made in mems but the preparation was not finished and thus the TX could not be considered as the latest in TX manager. - It's a cascading rollback with more than on TX. It would be graceful for the latest aborted TX to set the previous TX as the latest after the abortion. But the TX does not know the previous prepared TX and simply set to NULL appropriate pointer; when the time comes for the previous TX to be aborted it does not see itself as the latest. The TX must not expect itself to be the latest but must handle the last_prepared_tx pointer only if it is the latest. Fix it and add tests. Fix #2588 (case 1) Fix #2591 (case 2)
Showing
- src/box/vy_tx.c 20 additions, 3 deletionssrc/box/vy_tx.c
- test/vinyl/errinj.result 30 additions, 0 deletionstest/vinyl/errinj.result
- test/vinyl/errinj.test.lua 12 additions, 0 deletionstest/vinyl/errinj.test.lua
- test/vinyl/gh.result 14 additions, 0 deletionstest/vinyl/gh.result
- test/vinyl/gh.test.lua 6 additions, 0 deletionstest/vinyl/gh.test.lua
Loading
Please register or sign in to comment