Vladislav Pyatkov created IGNITE-28958:
------------------------------------------

             Summary: Prevent deadlocks in concurrent bulk operations with 
different key orders
                 Key: IGNITE-28958
                 URL: https://issues.apache.org/jira/browse/IGNITE-28958
             Project: Ignite
          Issue Type: Bug
          Components: cache
            Reporter: Vladislav Pyatkov
         Attachments: BulkOperationDeadlockIntegrationTest.java

h2.Motivation
Concurrent bulk operations executed in pessimistic transactions may acquire 
locks for the same set of entries in different orders. This can produce a 
cyclic lock dependency between transactions and eventually result in a 
deadlock, transaction timeout, or failure to finish the operation.
The problem can be reproduced with both SQL DML and KeyValue API operations:
# Concurrent UPDATE statements affecting the same rows through a WHERE 
condition.
# Concurrent IgniteCache.putAll calls whose input maps iterate over the same 
keys in opposite orders.
# Concurrent IgniteCache.getAll calls whose input sets iterate over the same 
keys in opposite orders. REPEATABLE_READ isolation is used so that getAll 
acquires transactional locks.

BulkOperationDeadlockIntegrationTest provides the reproducing scenarios:
- testUpdateWithWhereDoesNotDeadlock
- testPutAllWithOppositeKeyOrderDoesNotDeadlock
- testGetAllWithOppositeKeyOrderDoesNotDeadlock




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to