Red Hat Bugzilla – Bug 1016054
CommitCommand with replayed PrepareCommand executes rollback and then commit
Last modified: 2013-11-21 03:54:59 EST
During state-transfer in tx cache, the node can receive CommitCommand from other node. After the node gets transaction data for affected segments, it creates the transaction with missingLookedUpEntries=true and the CommitCommand can be executed.
In this command's perform(...) the transaction is first marked as completed, then it enters the interceptor chain. There, the PrepareCommand is created in StateTransferInterceptor.visitCommitCommand but after this is processed the TxInterceptor finds out that the transaction is already completed and executes RollbackCommand, clearing locks etc.
Nevertheless, StateTransferInterceptor executes the initial CommitCommand afterwards. I suspect that this may be executed without the locks held.
Anyway, it is not correct to execute both commit and rollback on the same transaction.
Dan Berindei <email@example.com> made a comment on jira ISPN-3599
[~rvansa], does this cause any inconsistencies?
Radim Vansa <firstname.lastname@example.org> made a comment on jira ISPN-3599
Actually, I am not sure - I've noticed this behaviour when tracking down ISPN-3600 (and the inconsistency was caused by the 3600). However, I believe that it can lead to inconsistency as the locks are released (is it, during the rollback, right?) before the entries are committed.
Pedro Ruivo <email@example.com> updated the status of jira ISPN-3599 to Coding In Progress
Pedro Ruivo <firstname.lastname@example.org> made a comment on jira ISPN-3599
Good catch [~rvansa]