jakarta-ee - 一致性: BackingMap is not resettable

标签 jakarta-ee distributed-computing distributed-caching oracle-coherence

我正在尝试以分布式模式设置一个 4 节点 Coherence 集群(其他配置基本上是默认的),然后关闭其中一个节点并观察它如何设法平衡其余节点。对于关闭我使用

CacheFactory.destroyCache(myCache);
CacheFactory.shutdown();

应该关闭的节点不断写入:

Logger@9217551 3.7.1.0) (thread=DistributedCache, member=n/a): Remains to transfer before shutting down: 504 primary partitions, 0 backup partitions

但是另一个节点(或者有时更多)会抛出此异常:

java.lang.IllegalArgumentException: BackingMap is not resettable: x
  at com.tangosol.net.DefaultConfigurableCacheFactory$Manager.setBackingMap(DefaultConfigurableCacheFactory.java:4163)
  at com.tangosol.net.DefaultConfigurableCacheFactory$Manager.instantiateBackingMap(DefaultConfigurableCacheFactory.java:4114)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.instantiateBackingMap(PartitionedCache.CDB:22)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.setCacheName(PartitionedCache.CDB:25)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.ensureStorage(PartitionedCache.CDB:5)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.receivePartition(PartitionedCache.CDB:11)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onFinalizePrimaryTransfer(PartitionedService.CDB:141)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService$Continuations$Continuation.proceed(PartitionedService.CDB:10)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$EventsHelper.onEntriesArrived(PartitionedCache.CDB:42)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$TransferControl.onReceiveStarted(PartitionedCache.CDB:19)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onTransferRequest(PartitionedService.CDB:76)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService$TransferRequest.onReceived(PartitionedService.CDB:1)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:34)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
  at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
  at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
  at java.lang.Thread.run(Thread.java:662)

我发现实际上 PartitionedCache$Storage 尚未设置其缓存名称(getCacheName() 在该对象上返回 null) - 这很糟糕,因为我不不想实例化另一个支持 map - 但我完全不知道是什么原因导致的以及我应该如何配置它。

感谢您的任何(有用)回复。

最佳答案

好的,我已经找到了。我正在使用 CacheFactory.destroyCache(...) ,这会导致集群范围的缓存关闭。当我使用 CacheFactory.releaseCache(...) 然后使用 CacheFactory.shutdown() 时,它做了它应该做的事情。

关于jakarta-ee - 一致性: BackingMap is not resettable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12071244/

相关文章:

Python 分布式计算(有效)

hadoop - 从分布式缓存或 HDFS 输出中读取

hadoop - 分布式缓存不起作用

java - 缓存实现

java - JMS - 消息选择器如何与多个队列和主题消费者一起工作?

eclipse - 如何使用 eclipse 和 gradle 创建 Java EE 7 应用程序?

jakarta-ee - Arquillian + Wildfly + Gradle警告

java - 如何为 EJB 选择本地接口(interface)?

c# - 使用 CORBA 或 ICE 的计算机科学项目的想法

c - 使用MPI的不同大小的散布矩阵 block