You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/11/14 18:48:32 UTC

[GitHub] [ignite-3] vldpyatkov opened a new pull request, #1342: IGNITE-18052 Introduce short term locks for sorted indexes operations

vldpyatkov opened a new pull request, #1342:
URL: https://github.com/apache/ignite-3/pull/1342

   https://issues.apache.org/jira/browse/IGNITE-18052


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite-3] vldpyatkov commented on a diff in pull request #1342: IGNITE-18052 Introduce short term locks for sorted indexes operations

Posted by GitBox <gi...@apache.org>.
vldpyatkov commented on code in PR #1342:
URL: https://github.com/apache/ignite-3/pull/1342#discussion_r1023271655


##########
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:
   There is no race, a marked for remove waiter is not used to acquire a lock (there are ignored in the while loop).



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite-3] vldpyatkov merged pull request #1342: IGNITE-18052 Introduce short term locks for sorted indexes operations

Posted by GitBox <gi...@apache.org>.
vldpyatkov merged PR #1342:
URL: https://github.com/apache/ignite-3/pull/1342


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite-3] denis-chudov commented on a diff in pull request #1342: IGNITE-18052 Introduce short term locks for sorted indexes operations

Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org