Question

I am trying to setup a 4-node Coherence cluster in distributed mode (other configuration is basically default), then shutdown one of the nodes and watch how it manages to balance the rest of nodes. For the shutdown I use

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

The node that should shutdown keeps writing this:

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

but another node (or sometimes more of them) throw this exception:

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)

I have found that actually PartitionedCache$Storage has not set up its cache name (getCacheName() returns null on this object) - and that's bad, because I don't want to instantiate another backing map - but I have absolutely no clue what causes that and how should I configure it.

Thanks for any (useful) response.

Was it helpful?

Solution

Okay, I have found it. I was using CacheFactory.destroyCache(...) which causes cluster-wide cache shutdown. When I have used CacheFactory.releaseCache(...) and then CacheFactory.shutdown() it did what it should.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top