Reputation: 177
I have one server node and one client node. In DataStorageConfiguration ,persistent is enabled. I restarted my server node and trying to perform the operations on cache. I am getting below exceptions. This exception is if I use DataStorageConfiguration.
Caused by: class org.apache.ignite.IgniteException: Cannot start/stop cache within lock or transaction. [cacheName=, operation=dynamicStartCache] at org.apache.ignite.internal.processors.cache.GridCacheProcessor.checkEmptyTransactionsEx(GridCacheProcessor.java:4879) at org.apache.ignite.internal.processors.cache.GridCacheProcessor.dynamicStartCache(GridCacheProcessor.java:3460) at org.apache.ignite.internal.processors.cache.GridCacheProcessor.dynamicStartCache(GridCacheProcessor.java:3404) at org.apache.ignite.internal.processors.cache.GridCacheProcessor.publicJCache(GridCacheProcessor.java:4416) at org.apache.ignite.internal.processors.cache.GridCacheProcessor.publicJCache(GridCacheProcessor.java:4387) at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.checkProxyIsValid(GatewayProtectedCacheProxy.java:1602) at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.onEnter(GatewayProtectedCacheProxy.java:1619) at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.put(GatewayProtectedCacheProxy.java:853)
Can you please help?
Upvotes: 0
Views: 587
Reputation: 177
Ignite Cache Reconnection Issue (Cache is stopped)
I have refereed above link and liten the reconnect event and then call ignite.getOrCreateCache(spaCacheName);
Upvotes: 1
Reputation: 19343
I guess you should not use e.g. getOrCreateCache
within a started transaction. Create all of your caches before starting a transaction. I think it's pretty self-explanatory.
Upvotes: 0