【问题标题】:Can not start/stop cache within lock or transaction with DataStorageConfiguration无法使用 DataStorageConfiguration 在锁或事务中启动/停止缓存
【发布时间】:2020-07-15 18:20:44
【问题描述】:

我有一个服务器节点和一个客户端节点。在 DataStorageConfiguration 中,启用了持久化。 我重新启动了服务器节点并尝试对缓存执行操作。我得到以下例外。这个例外是如果我使用 DataStorageConfiguration。

原因:类 org.apache.ignite.IgniteException:无法在锁或事务中启动/停止缓存。 [cacheName=, operation=dynamicStartCache] 在 org.apache.ignite.internal.processors.cache.GridCacheProcessor.checkEmptyTransactionsEx(GridCacheProcessor.java:4879) 在 org.apache.ignite.internal.processors.cache.GridCacheProcessor.dynamicStartCache(GridCacheProcessor.java:3460) 在 org.apache.ignite.internal.processors.cache.GridCacheProcessor.dynamicStartCache(GridCacheProcessor.java:3404) 在 org.apache.ignite.internal.processors.cache.GridCacheProcessor.publicJCache(GridCacheProcessor.java:4416) 在 org.apache.ignite.internal.processors.cache.GridCacheProcessor.publicJCache(GridCacheProcessor.java:4387) 在 org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.checkProxyIsValid(GatewayProtectedCacheProxy.java:1602) 在 org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.onEnter(GatewayProtectedCacheProxy.java:1619) 在 org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.put(GatewayProtectedCacheProxy.java:853)

你能帮忙吗?

【问题讨论】:

    标签: ignite


    【解决方案1】:

    Ignite Cache Reconnection Issue (Cache is stopped)

    我已经参考了上面的链接并启动了重新连接事件,然后调用了 ignite.getOrCreateCache(spaCacheName);

    【讨论】:

      【解决方案2】:

      我猜你不应该使用例如getOrCreateCache 在已启动的事务中。在开始事务之前创建所有缓存。我认为这是不言自明的。

      【讨论】:

      • 我的缓存是在开始事务之前创建的
      猜你喜欢
      • 2017-03-09
      • 2011-11-28
      • 1970-01-01
      • 1970-01-01
      • 2014-05-14
      • 2017-04-23
      • 1970-01-01
      • 1970-01-01
      • 2016-04-13
      相关资源
      最近更新 更多