ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Mekhanikov <dmekhani...@gmail.com>
Subject Re: Problems with unlocking multiply held cache locks.
Date Wed, 27 Jun 2018 17:28:37 GMT
Cross-posting to developers list.

Guys, cache locks work inconsistently: if you take a lock twice, but
release it only once, then *IgniteCache#isLocalLocked* will tell you, that
you hold a lock, but another node will be able to acquire it.
We should either make the lock non-reentrant, or not release the cache lock
until it's unlocked the corresponding number of times.

Initial post:
http://apache-ignite-users.70518.x6.nabble.com/Problems-with-unlocking-multiply-held-cache-locks-td22317.html

Denis

ср, 27 июн. 2018 г. в 17:00, Jon Tricker <jtricker@temenos.com>:

> It appears that cache locks are intended to support re-entrancy. The
> debugger shows a count variable and the lock can be taken several times by
> the same node and then unlocked an equal number of times.
>
>
>
> If a node has taken a lock several times a second node attempts to take
> the same lock then, as expected, it blocks. However if the first node frees
> the lock once the second node unlocks and both nodes end up holding the
> lock.
>
>
>
> Hopefully demonstrated by the attached test code.
>
> The information in this e-mail and any attachments is confidential and may
> be legally privileged. It is intended solely for the addressee or
> addressees. Any use or disclosure of the contents of this
> e-mail/attachments by a not intended recipient is unauthorized and may be
> unlawful. If you have received this e-mail in error please notify the
> sender. Please note that any views or opinions presented in this e-mail are
> solely those of the author and do not necessarily represent those of
> TEMENOS. We recommend that you check this e-mail and any attachments
> against viruses. TEMENOS accepts no liability for any damage caused by any
> malicious code or virus transmitted by this e-mail.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message