ascherbakoff commented on code in PR #2720:
URL: https://github.com/apache/ignite-3/pull/2720#discussion_r1421723173
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java:
##########
@@ -51,53 +55,121 @@
import org.apache.ignite.internal.tx.event.LockEvent;
import org.apache.ignite.internal.tx.event.LockEventParameters;
import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.TestOnly;
/**
* A {@link LockManager} implementation which stores lock queues in the heap.
*
* <p>Lock waiters are placed in the queue, ordered according to comparator
provided by {@link HeapLockManager#deadlockPreventionPolicy}.
- * When a new waiter is placed in the queue, it's validated against current
lock owner: if there is an owner with a higher transaction id
- * lock request is denied.
+ * When a new waiter is placed in the queue, it's validated against current
lock owner: if there is an owner with a higher priority (as
+ * defined by comparator) lock request is denied.
*
* <p>Read lock can be upgraded to write lock (only available for the lowest
read-locked entry of
* the queue).
+ *
+ * <p>Additionally limits the lock map size.
Review Comment:
A collision will happen - the different keys can be mapped to a single lock
table slot.
The test for this is here [1]
[1] org.apache.ignite.distributed.ItLockTableTest#testCollision
--
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]