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

Vladislav Pyatkov updated IGNITE-22980:
---------------------------------------
    Description: 
h3. Motivation
The behavior was hardly predicted or planned. But currently, we can acquery a 
lock:
{code:java}
        private void lock() {
            IgniteUtils.dumpStack(Loggers.forClass(HeapLockManager.class), 
"Lock is taken " + intendedLockMode);

            lockMode = intendedLockMode;

            intendedLockMode = null;

            intendedLocks.clear();
        }
{code}
and made the waiter fail:
{code:java}
        private void fail(LockException e) {
            ex = e;
        }
{code}
without limitation (assertion checking or explicitly prohibition).

h3. Definition of done
Only one method can be applied to a lock attempt ether lock() or fail(), but 
not both.
Do not forget, a retry attempt may be successful even though the previous 
attempt failed.



  was:
h3. Motivation
The behavior was hardly predicted or planned. But currently, we can acquery a 
lock:
{code:java}
        private void lock() {
            IgniteUtils.dumpStack(Loggers.forClass(HeapLockManager.class), 
"Lock is taken " + intendedLockMode);

            lockMode = intendedLockMode;

            intendedLockMode = null;

            intendedLocks.clear();
        }
{code}
and made the waiter fail:
{code:java}
        private void fail(LockException e) {
            ex = e;
        }
{code}
without limitation (assertion checking or explicitly prohibition).

h3. Definition of done
Only one method can be applied to a lock attempt ether lock() or fail(), but 
not both.




> Lock manager may fail and lock waiter simultaneously
> ----------------------------------------------------
>
>                 Key: IGNITE-22980
>                 URL: https://issues.apache.org/jira/browse/IGNITE-22980
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Vladislav Pyatkov
>            Priority: Major
>              Labels: ignite-3
>
> h3. Motivation
> The behavior was hardly predicted or planned. But currently, we can acquery a 
> lock:
> {code:java}
>         private void lock() {
>             IgniteUtils.dumpStack(Loggers.forClass(HeapLockManager.class), 
> "Lock is taken " + intendedLockMode);
>             lockMode = intendedLockMode;
>             intendedLockMode = null;
>             intendedLocks.clear();
>         }
> {code}
> and made the waiter fail:
> {code:java}
>         private void fail(LockException e) {
>             ex = e;
>         }
> {code}
> without limitation (assertion checking or explicitly prohibition).
> h3. Definition of done
> Only one method can be applied to a lock attempt ether lock() or fail(), but 
> not both.
> Do not forget, a retry attempt may be successful even though the previous 
> attempt failed.



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

Reply via email to