Aleksey Plekhanov created IGNITE-26753:
------------------------------------------
Summary: Inconsistent behaviour on concurrent commit and timout
with 1PC
Key: IGNITE-26753
URL: https://issues.apache.org/jira/browse/IGNITE-26753
Project: Ignite
Issue Type: Bug
Reporter: Aleksey Plekhanov
Assignee: Aleksey Plekhanov
In case of one-phase-commit we have inconsistent behaviour, when transaction is
commiting and timed out concurrently. User can get transaction timeout
exception on commit, but tx still will be commited.
Reproducer:
{code:java}
public void testConsistencyAfterTimeout1PC() throws Exception {
IgniteEx srv = startGrid(0);
IgniteEx client = startClientGrid(1);
long txTimout = 1_000L;
IgniteCache<Object, Object> cache = client.getOrCreateCache(new
CacheConfiguration<>(DEFAULT_CACHE_NAME)
.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL));
Transaction tx = client.transactions().txStart(PESSIMISTIC,
REPEATABLE_READ, txTimout, 0);
cache.put(0, 0);
DelayingTcpCommunicationSpi.delay(srv, GridNearTxPrepareResponse.class, 2 *
txTimout);
try {
tx.commit();
assertTrue(cache.containsKey(0));
} catch (Exception e) {
assertFalse(cache.containsKey(0));
}
}
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)