You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Kamal C <ka...@gmail.com> on 2016/08/04 07:34:20 UTC
Ignite Semaphore Exception
Hi all,
I'm facing the below exception while using the Ignite Semaphore.
Exception in thread "main" class org.apache.ignite.IgniteException: Failed
to find semaphore with given name: Hello
at
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:906)
at
org.apache.ignite.internal.processors.datastructures.GridCacheSemaphoreImpl$Sync.compareAndSetGlobalState(GridCacheSemaphoreImpl.java:347)
at
org.apache.ignite.internal.processors.datastructures.GridCacheSemaphoreImpl$Sync.tryReleaseShared(GridCacheSemaphoreImpl.java:253)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1340)
at
org.apache.ignite.internal.processors.datastructures.GridCacheSemaphoreImpl.release(GridCacheSemaphoreImpl.java:755)
at
org.apache.ignite.internal.processors.datastructures.GridCacheSemaphoreImpl.release(GridCacheSemaphoreImpl.java:743)
at
my.apache.ignite.examples.datastructures.SemaphoreExample.main(SemaphoreExample.java:32)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to find
semaphore with given name: Hello
at
org.apache.ignite.internal.processors.datastructures.GridCacheSemaphoreImpl$Sync$1.call(GridCacheSemaphoreImpl.java:296)
at
org.apache.ignite.internal.processors.datastructures.GridCacheSemaphoreImpl$Sync$1.call(GridCacheSemaphoreImpl.java:287)
at
org.apache.ignite.internal.processors.cache.GridCacheUtils$23.call(GridCacheUtils.java:1648)
at
org.apache.ignite.internal.processors.cache.GridCacheUtils.outTx(GridCacheUtils.java:891)
at
org.apache.ignite.internal.processors.datastructures.GridCacheSemaphoreImpl$Sync.compareAndSetGlobalState(GridCacheSemaphoreImpl.java:286)
... 5 more
I've listed the steps to reproduce the exception and the code in a gist[1]
[1]: https://gist.github.com/Kamal15/f83e0d17c4a21caf15ec4486406b2c12
Regards,
Kamal C
Re: Ignite Semaphore Exception
Posted by Kamal C <ka...@gmail.com>.
After enabling the Atomic backups to "1". It worked. Thanks Ross!
Regards,
Kamal
On Thu, Aug 4, 2016 at 2:03 PM, ross.anderson <ro...@caplin.com>
wrote:
> Hi Kamal, I think I found something similar yesterday.
>
> In your Ignite configuration, try setting Atomic backups to 1 (it defaults
> to 0, so when the node where it resides goes down it is lost)
>
> See the bottom of this page:
> http://apacheignite.gridgain.org/docs/atomic-types
>
> Best,
> Ross
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Ignite-Semaphore-Exception-tp6736p6741.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
Re: Ignite Semaphore Exception
Posted by "ross.anderson" <ro...@caplin.com>.
Hi Kamal, I think I found something similar yesterday.
In your Ignite configuration, try setting Atomic backups to 1 (it defaults
to 0, so when the node where it resides goes down it is lost)
See the bottom of this page:
http://apacheignite.gridgain.org/docs/atomic-types
Best,
Ross
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite-Semaphore-Exception-tp6736p6741.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.