I have a system of Akka actors that all extend a trait that goes on to
obtain an Ignite cache reference with the same name (in the example below
it is called "GenderCache"). In order to be safe, I am using
getOrCreateCache() which I believe will either create a cache or return a
reference to an existing one.

I am getting the error below when doing the above from multiple actors and
am not sure what exactly is going on. Is the error telling me that the
cache is in the process of being created while I am trying to issue another
getOrCreateCache() call with the same cache name? Or...?

My expectation would be that one of these calls would result in a cache
create operation and the rest would be just returning a reference.

Thanks!

Caused by: org.apache.ignite.cache.CacheExistsException: Failed to start
cache (a cache with the same name is already being started or stopped):
GenderCache
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.initiateCacheChanges(GridCacheProcessor.java:1714)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.dynamicStartCache(GridCacheProcessor.java:1663)
at
org.apache.ignite.internal.IgniteKernal.getOrCreateCache(IgniteKernal.java:2289)
at
com.datascience.socialnetworkpollers.IgniteCacheInstance$.getOrCreateCache(Cacheable.scala:21)

Reply via email to