[ 
https://issues.apache.org/jira/browse/IGNITE-24267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17916183#comment-17916183
 ] 

Vladislav Pyatkov edited comment on IGNITE-24267 at 1/27/25 8:42 AM:
---------------------------------------------------------------------

The new lock manager implementation does not influence the performance.
{noformat}
Benchmark                 (batch)  (fsync)  (lockSlots)  (partitionCount)  
(useLocks)   Mode  Cnt       Score       Error  Units
UpsertKvBenchmark.upsert        1    false      1048576                32       
   V1  thrpt   20  147541.810 ± 28774.922  ops/s
UpsertKvBenchmark.upsert        1    false      1048576                32       
   V2  thrpt   20  162817.990 ± 15843.593  ops/s
UpsertKvBenchmark.upsert        1    false       131072                32       
   V1  thrpt   20  155244.093 ± 23497.022  ops/s
UpsertKvBenchmark.upsert        1    false       131072                32       
   V2  thrpt   20  157714.481 ± 17053.298  ops/s
UpsertKvBenchmark.upsert        1    false         1024                32       
   V1  thrpt   20  144612.223 ± 32303.130  ops/s
UpsertKvBenchmark.upsert        1    false         1024                32       
   V2  thrpt   20  164248.990 ± 16018.491  ops/s
{noformat}


was (Author: v.pyatkov):
The new lock manager implementation does not influence the performance.
{noformat}
Benchmark                 (batch)  (fsync)  (lockSlots)  (partitionCount)  
(useLocks)   Mode  Cnt       Score       Error  Units
UpsertKvBenchmark.upsert        1    false      1048576                32  
OldLockMng  thrpt   20  150041.899 ± 13120.569  ops/s
UpsertKvBenchmark.upsert        1    false      1048576                32  
NewLockMng  thrpt   20  150748.023 ± 19264.800  ops/s
UpsertKvBenchmark.upsert        1    false       131072                32  
OldLockMng  thrpt   20  155406.419 ± 14196.133  ops/s
UpsertKvBenchmark.upsert        1    false       131072                32  
NewLockMng  thrpt   20  155054.783 ± 14608.008  ops/s
UpsertKvBenchmark.upsert        1    false         1024                32  
OldLockMng  thrpt   20  157328.309 ± 14838.297  ops/s
UpsertKvBenchmark.upsert        1    false         1024                32  
NewLockMng  thrpt   20  155993.345 ± 15001.843  ops/s
{noformat}

> Heap lock manager behave incorrectly in case of overflow
> --------------------------------------------------------
>
>                 Key: IGNITE-24267
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24267
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Vladislav Pyatkov
>            Assignee: Vladislav Pyatkov
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.1
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> h3. Motivation
> This is a test that demonstrates the misbehavior of current lock manager 
> implementation:
> {code}
> @Test
> public void testCollision() throws Exception {
>     int maxSlots = 16;
>     HeapLockManager lockManager = new HeapLockManager(maxSlots, maxSlots);
>     lockManager.start(new WaitDieDeadlockPreventionPolicy());
>     UUID[] txs = new UUID[maxSlots];
>     for (int i = 0; i < maxSlots; i++) {
>         txs[i] = TestTransactionIds.newTransactionId();
>         lockManager.acquire(txs[i], new LockKey(txs[i], txs[i]), 
> LockMode.S).get();
>     }
>     UUID collisionTx = TestTransactionIds.newTransactionId();
>     lockManager.acquire(collisionTx, new LockKey(collisionTx, collisionTx), 
> LockMode.S).get();
>     int collisionSlot = -1;
>     for (int i = 0; i < maxSlots; i++) {
>         if (lockManager.queue(new LockKey(txs[i], txs[i])).size() == 2) {
>             collisionSlot = i;
>         } else {
>             lockManager.releaseAll(txs[i]);
>         }
>     }
>     assertTrue(collisionSlot >= 0, "Collision slot was not found.");
>     UUID otherTx = TestTransactionIds.newTransactionId();
>     CompletableFuture<Lock> xLockFut = lockManager.acquire(otherTx, new 
> LockKey(collisionTx, collisionTx), LockMode.X);
>     assertThrows(ExecutionException.class, xLockFut::get, "Failed to acquire 
> a lock due to a possible deadlock");
>     lockManager.releaseAll(txs[collisionSlot]);
>     lockManager.releaseAll(collisionTx);
>     lockManager.releaseAll(otherTx);
>     assertTrue(lockManager.isEmpty());
> }
> {code}
> h3. Definition of done
> We have to forbid using conflicted locks on one key, even if it would lead to 
> throwing an exception on the overflow lock table.



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

Reply via email to