denis-chudov commented on code in PR #1342:
URL: https://github.com/apache/ignite-3/pull/1342#discussion_r1023136255


##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java:
##########
@@ -109,10 +110,12 @@ public void release(Lock lock) {
     }
 
     @Override
-    public void downgrade(Lock lock, LockMode lockMode) throws LockException {
-        LockState state = lockState(lock.lockKey());
+    public void release(UUID txId, LockKey lockKey, LockMode lockMode) {
+        LockState state = lockState(lockKey);
 
-        state.tryDowngrade(lock, lockMode);
+        if (state.tryRelease(txId, lockMode)) {
+            locks.remove(lockKey, state);

Review Comment:
   possible race here?



-- 
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