Skip to content
Snippets Groups Projects
user avatar
Alexandr Lyapunov authored
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)
87a2989b
History
Name Last commit Last update