You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Luchnikov Alexander (Jira)" <ji...@apache.org> on 2022/05/13 09:19:00 UTC
[jira] [Updated] (IGNITE-15800) Reentrant lock doesn't work after client node reconnects.
[ https://issues.apache.org/jira/browse/IGNITE-15800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luchnikov Alexander updated IGNITE-15800:
-----------------------------------------
Labels: ise.lts (was: )
> Reentrant lock doesn't work after client node reconnects.
> ---------------------------------------------------------
>
> Key: IGNITE-15800
> URL: https://issues.apache.org/jira/browse/IGNITE-15800
> Project: Ignite
> Issue Type: Bug
> Reporter: Sergey Uttsel
> Assignee: Sergey Uttsel
> Priority: Major
> Labels: ise.lts
> Fix For: 2.13
>
> Attachments: clientReconnectTest.java
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> When client node reconnects, an existing igniteLock doesn't work
> [^clientReconnectTest.java]
>
> {code:java}
> java.lang.IllegalMonitorStateException 2 at org.apache.ignite.internal.processors.datastructures.GridCacheLockImpl$Sync.tryRelease(GridCacheLockImpl.java:449) 3 at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1261) 4 at org.apache.ignite.internal.processors.datastructures.GridCacheLockImpl.unlock(GridCacheLockImpl.java:1262){code}
> the root cause is node id stored in GridCacheLockImpl.Sync.thisNode is not updated after client node rejoins cluster with new node id.
> Steps to reproduce:
> 1. Start server node
> 2. Start client node
> 3. create an instance of IgniteLock
> 4. disconnect client node from network (simulate network failure)
> 5. restore network, wait for the client to reconnect the server node
> 6. start two threads on the client node
> 7. in thread 1 call lock() on IgniteLock instance from step 3
> 8. in thread 2 call lock() the same IgniteLock instance
> Expected result: thread 2 waits for thread 1 to release lock
> Actual result: thread 2 acquires lock
> 9. in thread 1 call unlock() on the same IgniteLock instance
> Expected result: the lock is released by thread 1
> Actual result: thread 1 throws the following exception
--
This message was sent by Atlassian Jira
(v8.20.7#820007)