Committing/rolling-back already committed transaction after one of node is killed #12705
Labels
Module: IMap
Module: Transactions
Source: Community
PR or issue was opened by a community user
Team: Core
Type: Defect
Milestone
Hello,
Recently I have discovered some issue with MapInterceptor and TransactionContext in a multi-node environment.
Basically, here are steps to reproduce:
The problem:
After killing the node - the second one try to recover data and invoke
MapStore#storeAll
with inconsistent data.Hazelcast version:
3.9.3
Java version:
1.8
Here is my hazelcast configuration:
I have Dummy object which is simple POJO with two fields - key (used in map as key) and dateTime:
MapInterceptor main responsibility is to interceptPut as given:
Moreover, I've created MapStore with simple ConcurrentMap as a data store (to simplify the case). The store has a constraint on DummyObject.dateTime - cannot be null:
My main test method:
Additionally, I have one more node already started in the cluster.
The TransactionalPut task is defined as follow:
Summary:
Just before node was killed I see that on the map I have correct values.
After the shutdown of a node, I've got logs form TransactionManagerService that said
Committing/rolling-back alive transactions of Member...
I guess it should not take place because I've already committed this transaction and as a proof, I can see correct values in IMap.
Moreover, hazelcast just after the node was killed try to store values without changes applied by MapInterceptor (DummyObject.dateTime is null).
This only happens if I use transaction - without it the map is in the expected state.
The text was updated successfully, but these errors were encountered: