我将该项目从8.2.4最后迁移到Infinispan9.1.0 from,并得到了下一个异常:
org.infinispan.commons.CacheConfigurationException: ISPN000441:用于事务性缓存的不支持的异步缓存模式“REPL_ASYNC”
相关代码:
new ConfigurationBuilder()
.jmxStatistics()
.enabled(false)
.available(false)
.clustering()
.cacheMode(CacheMode.REPL_ASYNC)
.stateTransfer().awaitInitialTransfer(false)
.transaction()
.transactionManagerLookup(new DummyTransactionManagerLookup())
.transactionMode(TransactionMode.TRANSACTIONAL)
.lockingMode(LockingMode.PESSIMISTIC)
.recovery()
.enabled(false)
.invocationBatching()
.enable(false)
.indexing()
.index(Index.ALL)
.addProperty("default.indexmanager", "near-real-time")
.addProperty("default.directory_provider", "ram")
.addProperty("default.worker.execution", "sync")
.addProperty("default.exclusive_index_use", "true")
.addProperty("default.reader.strategy", "shared")
.build();这里还有问题组合,但在8.2.4中,最终版本效果很好。
.cacheMode(CacheMode.REPL_ASYNC)
.transactionMode(TransactionMode.TRANSACTIONAL) // Maybe is there another way to lock put operations?如何重新配置缓存以保存其特性?
发布于 2017-07-25 09:52:14
用于事务缓存的异步模式是不安全的,因为它不需要等待事务在集群中的每个节点中提交,然后才向TransactionManager报告。如果你运气不好,这会使你的数据不一致。
为了避免任何问题,它被删除了。请将您的配置升级为使用REPL_SYNC。
另外,DummyTransactionManagerLookup也被废弃了,它应该被EmbeddedTransactionManagerLookup取代。
在8.x和9.x之间还有其他与事务相关的变化。有关更多细节,请查看升级指南(0)。
https://stackoverflow.com/questions/45299164
复制相似问题