JAkutenshi commented on code in PR #7107:
URL: https://github.com/apache/ignite-3/pull/7107#discussion_r2577937485


##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java:
##########
@@ -868,15 +857,20 @@ private boolean isWaiterReadyToNotify(WaiterImpl waiter, 
boolean skipFail) {
 
             for (Entry<UUID, WaiterImpl> entry : 
waiters.tailMap(waiter.txId(), false).entrySet()) {
                 WaiterImpl tmp = entry.getValue();
-                LockMode mode = tmp.lockMode;
+                LockMode currentlyAcquiredLockMode = tmp.lockMode;
 
-                if (mode != null && !mode.isCompatible(intendedLockMode)) {
+                if (currentlyAcquiredLockMode != null && 
!currentlyAcquiredLockMode.isCompatible(intendedLockMode)) {
                     if (conflictFound(waiter.txId())) {
                         waiter.fail(abandonedLockException(waiter.txId, 
tmp.txId));
 
                         return true;
                     } else if (!deadlockPreventionPolicy.usePriority() && 
deadlockPreventionPolicy.waitTimeout() == 0) {
-                        waiter.fail(lockException(waiter.txId, tmp.txId));
+                        waiter.fail(new PossibleDeadlockOnLockAcquireException(

Review Comment:
   I would, but it's better to leave this PR dedicated to the issue and if the 
approach will be approved then refactor the rest of cases. I suggest to leave 
it as is for now if you don't mind.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to