ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Aleksandrov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-8833) IgniteCache.isLocalLocked method has unexpected behivior in case of several nodes started in one JVM in different threads
Date Tue, 19 Jun 2018 13:18:00 GMT
Andrey Aleksandrov created IGNITE-8833:
------------------------------------------

             Summary: IgniteCache.isLocalLocked method has unexpected behivior in case of
several nodes started in one JVM in different threads
                 Key: IGNITE-8833
                 URL: https://issues.apache.org/jira/browse/IGNITE-8833
             Project: Ignite
          Issue Type: Bug
          Components: cache, documentation
    Affects Versions: 2.5
            Reporter: Andrey Aleksandrov
             Fix For: 2.6
         Attachments: ThreadLockedTest.java

According to specification:

[https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/IgniteCache.html#isLocalLocked-K-boolean-]


Checks if specified key is locked.This is a local in-VM operation and does not involve any
network trips or access to persistent storage in any way.

Parameters:

{{key}} - Key to check.

{{byCurrThread}} - If {{true}} method will check that current thread owns a lock on this
key, other vise will check that any thread on any node owns a lock on this key.

Returns:{{True}} if lock is owned by some node.

In the attached test we start one node in the main thread and another node from the second
thread. In second node we take a lock but in main thread isLocalLocked shows that no thread
held the lock.

However tryLock works ok. So the behavior of the isLocalLocked method should be described
in this case or fixed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message