No transaction rollback and data loss when master node is terminated #10637
I am using hazelcast 3.8.1.
In case the master node is terminated in the middle of a two_phase transaction, the rollback for that transacion is not made resulting in data loss.
To reproduce the issue consider this two nodes. One implements this logic:
This will be the master node. A second node which should be initiated and added to the cluser before the transaction is created is the following:
If I kill the master node while the transaction is opened (during the infinite while), when the open transaction of the killed node are finalized in TransactionManagerServiceImpl.finalizeTransactionsOf a wrongtargetException is raised (when the QueueTransactionRollbackOperation is performed)
What results in the exception is the following. After killing the master node:
If the operation resulting in 5 is attempted before 4 is finished, the exception arises. Otherwise, it rollbacks the terminated node's transaction successfully. As a consequence of the exception, the object which was polled from the queue is not requeued.
Notice that if the node killed is not the master node, the transactions are rollbacked successfully as there is no need to fetch the most recent partition table.
The text was updated successfully, but these errors were encountered: