[ 
https://issues.apache.org/jira/browse/IGNITE-24223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladislav Pyatkov updated IGNITE-24223:
---------------------------------------
    Description: 
h3. Motivation
There is an invalid assert:
{code:java|title=HeapLockManager.java}
...
v = empty.poll();
 if (v == null) {
     res[0] = slots[index];
     assert !res[0].markedForRemove;
...
{code}
The propsal is invalid because after the empty slots queue is used, an empty 
slot might have appeared. The code takes a slot by the hash, and it can 
unintentionally take an empty one (opposite of the assertion).

h3. Definition of done
Fixed the branch where the empty slots queue returns {{null}}.

  was:
h3. Motivation
There is an invalid assert:
{code:java|title=HeapLockManager.java}
...
v = empty.poll();
 if (v == null) {
     res[0] = slots[index];
     assert !res[0].markedForRemove;
...
{code}

h3. Definition of done
Fixed the branch where the empty slots queue returns {{null}}.


> Heap lock manager can use empty slot not properly
> -------------------------------------------------
>
>                 Key: IGNITE-24223
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24223
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Vladislav Pyatkov
>            Priority: Major
>              Labels: ignite-3
>
> h3. Motivation
> There is an invalid assert:
> {code:java|title=HeapLockManager.java}
> ...
> v = empty.poll();
>  if (v == null) {
>      res[0] = slots[index];
>      assert !res[0].markedForRemove;
> ...
> {code}
> The propsal is invalid because after the empty slots queue is used, an empty 
> slot might have appeared. The code takes a slot by the hash, and it can 
> unintentionally take an empty one (opposite of the assertion).
> h3. Definition of done
> Fixed the branch where the empty slots queue returns {{null}}.



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

Reply via email to