One of our objects has a cache (com.atlassian.cache.Cache) which is initialized on the object creation.
When the object is created on one node -- it sends OBJ_CREATED event to other nodes to let them know and to create the same objects on them as well.
Sometimes the object is changed and this leads to the cache invalidation which is done with "cache.removeAll()" call.
The issue is that when object update is performed just after the object creation then we get the next errors in logs:
====================================================
2019-01-30 12:53:57,961 localq-reader-14 WARN anonymous 636x48x1 1k8m4mi 92.255.190.27,172.31.59.203 /secure/SetupLicense.jspa [c.a.j.c.distribution.localq.LocalQCacheOpReader] Runtime exception: UnrecoverableFailure occurred when processing: LocalQCacheOp{cacheName='com.bigbrassband.jira.git.services.gitmanager.SingleGitManager_5.cache', action=REMOVE_ALL, key=null, value=null, creationTimeInMillis=1548852837937} from cache replication queue: [queueId=queue_i06d7b12498aecfbe4_4_766da1cf38b8faaaa3868bd585dd2264, queuePath=/var/atlassian/application-data/jira/localq/queue_i06d7b12498aecfbe4_4_766da1cf38b8faaaa3868bd585dd2264], failuresCount: 1/2, error: java.rmi.NotBoundException: com.bigbrassband.jira.git.services.gitmanager.SingleGitManager_5.cache
2019-01-30 12:53:57,973 localq-reader-14 WARN anonymous 636x48x1 1k8m4mi 92.255.190.27,172.31.59.203 /secure/SetupLicense.jspa [c.a.j.c.distribution.localq.LocalQCacheOpReader] Abandoning sending because cache does not exist on destination node: LocalQCacheOp{cacheName='com.bigbrassband.jira.git.services.gitmanager.SingleGitManager_5.cache', action=REMOVE_ALL, key=null, value=null, creationTimeInMillis=1548852837937} from cache replication queue: [queueId=queue_i06d7b12498aecfbe4_4_766da1cf38b8faaaa3868bd585dd2264, queuePath=/var/atlassian/application-data/jira/localq/queue_i06d7b12498aecfbe4_4_766da1cf38b8faaaa3868bd585dd2264], failuresCount: 2/2. Removing from queue. Error: com.bigbrassband.jira.git.services.gitmanager.SingleGitManager_5.cache
java.rmi.NotBoundException: com.bigbrassband.jira.git.services.gitmanager.SingleGitManager_5.cache
at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:227)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(RegistryImpl_Skel.java:115)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:468)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:300)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:283)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:260)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:375)
at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:119)
at com.atlassian.jira.cluster.distribution.localq.rmi.BasicRMICachePeerProvider.lookupRemoteCachePeer(BasicRMICachePeerProvider.java:64)
at com.atlassian.jira.cluster.distribution.localq.rmi.BasicRMICachePeerProvider.create(BasicRMICachePeerProvider.java:39)
at com.atlassian.jira.cluster.distribution.localq.rmi.CachingRMICachePeerManager.getCachePeerFor(CachingRMICachePeerManager.java:58)
at com.atlassian.jira.cluster.distribution.localq.rmi.CachingRMICachePeerManager.withCachePeer(CachingRMICachePeerManager.java:91)
at com.atlassian.jira.cluster.distribution.localq.rmi.LocalQCacheOpRMISender.send(LocalQCacheOpRMISender.java:63)
at com.atlassian.jira.cluster.distribution.localq.LocalQCacheOpReader.run(LocalQCacheOpReader.java:84)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
====================================================
How to avoid these errors? Am I right that the cache syncing is stopped in that case (see "Abandoning sending" message)?
What we are doing wrong? How to proper invalidate the cache?
Thank you.