ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nyname00 <mario.st...@panagenda.com>
Subject Semaphore blocking on tryAcquire() while holding a cache-lock
Date Tue, 16 Feb 2016 13:57:12 GMT
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
  - 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

Is this this a known limitation/issue or am I doing something wrong here?

Thanks in advance, 

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.

View raw message