Kirill Tkalenko created IGNITE-29348:
----------------------------------------
Summary: Chained cache invoke() calls mishandle removal within a
transaction
Key: IGNITE-29348
URL: https://issues.apache.org/jira/browse/IGNITE-29348
Project: Ignite
Issue Type: Bug
Affects Versions: 2.18
Reporter: Kirill Tkalenko
Assignee: Kirill Tkalenko
When one {{invoke()}} removes an entry, the next {{invoke()}} on the same key
in the same transaction still sees the entry as present.
*KV reproduction*
Use a transactional cache.
{code:java}
cache.put(1, 10); try (Transaction tx =
ignite.transactions().txStart(PESSIMISTIC, READ_COMMITTED)) { cache.invoke(1,
(entry, args) -> { entry.remove(); return null; }); boolean exists =
cache.invoke(1, (entry, args) -> entry.exists()); // Expected false, got true.
}{code}
*Calcite reproduction*
On a transactional table {{t(id INT PRIMARY KEY, val INT)}} containing {{{}(1,
10){}}}, run both statements in the same transaction.
{code:java}
DELETE FROM t WHERE id = 1; INSERT INTO t VALUES (1, 20); -- Expected success,
got DUPLICATE_KEY.{code}
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)