Jakarta ee 一致性:BackingMap不可重置

Jakarta ee 一致性:BackingMap不可重置,jakarta-ee,distributed-computing,distributed-caching,oracle-coherence,Jakarta Ee,Distributed Computing,Distributed Caching,Oracle Coherence,我试图在分布式模式下设置一个4节点一致性集群,其他配置基本上是默认的,然后关闭其中一个节点,观察它如何平衡其余节点。对于我使用的关机 CacheFactory.destroyCache(myCache); CacheFactory.shutdown(); 应该关闭的节点将继续写入以下内容: Logger@9217551 3.7.1.0) (thread=DistributedCache, member=n/a): Remains to transfer before shutting down

我试图在分布式模式下设置一个4节点一致性集群,其他配置基本上是默认的,然后关闭其中一个节点,观察它如何平衡其余节点。对于我使用的关机

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——这很糟糕,因为我不想实例化另一个备份映射——但我完全不知道是什么原因导致了这一点,也不知道应该如何配置它


谢谢您的回复。

好的,我找到了。我用的是CacheFactory.destroyCache。。。这会导致群集范围的缓存关闭。当我使用CacheFactory.releaseCache时。。。然后CacheFactory.shutdown它做了它应该做的。

好的,我找到了。我用的是CacheFactory.destroyCache。。。这会导致群集范围的缓存关闭。当我使用CacheFactory.releaseCache时。。。然后CacheFactory.shutdown它做了它应该做的