Details
Description
`IgniteCache#removeAll` invocation are not transactional.
But, currently, Ignite allow to invoke `removeAll` inside transaction.
This lead to unexpected behavior and hides business logic errors.
We must disallow IgniteCache#removeAll call inside transaction.
/** */ @Test public void testClearInTransction() { IgniteCache<Object, Object> cache = client.createCache(new CacheConfiguration<>("my-cache").setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)); cache.put(1, 1); try (Transaction tx = client.transactions().txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.READ_COMMITTED)) { cache.put(2, 2); cache.removeAll(); tx.commit(); } assertFalse(cache.containsKey(1)); assertTrue(cache.containsKey(2)); }
Attachments
Issue Links
- is a clone of
-
IGNITE-23110 Disallow IgniteCache#clear inside transaction
- Resolved
- links to