ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yakov Zhdanov <yzhda...@apache.org>
Subject Re: Semaphore blocking on tryAcquire() while holding a cache-lock
Date Tue, 16 Feb 2016 15:45:49 GMT
Hi Mario!

Can you please share the code somehow? Reproducible example will be very
helpful.

--Yakov

2016-02-16 16:57 GMT+03:00 nyname00 <mario.stark@panagenda.com>:

> Hi Igniters,
>
> I'm getting some strange behavior when I try to call
> IgniteSemaphore#tryAquire() while holding a lock on a cache element - the
> method seems block forever.
>
> Here's the details:
>   - create a cache (default, transactional) and get a lock using
> Lock#tryLock()
>   - start a Executors.newSingleThreadScheduledExecutor() and schedule a
> worker to run every n seconds
>   - in the worker, get a semaphore and call IgniteSemaphore#tryAcquire()
>   - do some work and call IgniteSemaphore#release()
> (except for the cache/lock and semaphore no Ignite API calls are made)
>
> The whole thing works for a single node, but as soon as I start up an new
> node (with the same code) the IgniteSemaphore#tryAcquire() call starts
> blocking.
>
> Is this this a known limitation/issue or am I doing something wrong here?
>
> Thanks in advance,
> Mario
>
> ps: when I replace the cache-lock with an other semaphore, it works
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Semaphore-blocking-on-tryAcquire-while-holding-a-cache-lock-tp3031.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Mime
View raw message