[infinispan-dev] RPCs for non-existant caches ought not throw exception

Manik Surtani manik at jboss.org
Tue Sep 28 12:33:53 EDT 2010


On 27 Sep 2010, at 18:13, Sanne Grinovero wrote:

> 2010/9/27 Manik Surtani <manik at jboss.org>:
>> 
>> On 22 Sep 2010, at 00:07, Sanne Grinovero wrote:
>> 
>>> 2010/9/14 Manik Surtani <manik at jboss.org>:
>>>> FYI, just checked in
>>>> http://fisheye.jboss.org/changelog/Infinispan/branches/4.2.x?cs=2361
>>>> and tests run clean.
>>> 
>>> I just crashed against this, and after finding ISPN-648 I've tried to
>>> set strictPeerToPeer="false", this seemed initially to improve the
>>> situation as no more complaints about inexistent caches where logged,
>>> but then I got timeouts during StateTransfers, so I opened ISPN-661
>>> (which contains the full stacktraces of this timeout).
>>> 
>>> After changing Infinispan to timeout after 10 minutes, I'm back to the
>>> exceptions
>>> "org.infinispan.remoting.InboundInvocationHandlerImpl] Cache named
>>> (cachename) does not exist on this cache manager!"
>>> 
>>> Is there any known workaround to have a second node join the cluster
>>> while not all caches are initialized at the same time?
>>> 
>>> BTW from what I understood it seems I definitely need
>>> strictPeerToPeer="false", shouldn't this be the default?
>>> I think my use case is quite common, I just start more than one cache
>>> lazily. (Also I can't pre-start them as the configuration is not known
>>> until a service requests a cache, the invoker's context affects this
>>> configuration)
>> 
>> You start the caches lazily, but the cache managers eagerly?
>> 
> 
> Yes, just I have only one CacheManager per node, so the first request
> for any cache will trigger the CacheManager factory,
> other caches are then started on demand.
> It *seems* to be working fine, after applying this additional patch
> (yes I was waiting for you to come back) :
> [also see ISPN-661]:
> 
> Index: core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java
> ===================================================================
> --- core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java	(revision
> 2443)
> +++ core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java	(working
> copy)
> @@ -45,7 +45,7 @@
>    }
> 
>    private boolean isDefined(String cacheName) {
> -      log.error("Defined caches: {0}", embeddedCacheManager.getCacheNames());
> +      log.trace("Defined caches: {0}", embeddedCacheManager.getCacheNames());
>       return embeddedCacheManager.getCacheNames().contains(cacheName);
>    }
> 
> @@ -67,8 +67,9 @@
>          }
> 
>          if (cr == null) {
> -            if (log.isInfoEnabled()) log.info("Cache named {0} does
> not exist on this cache manager!", cacheName);
> -            return new ExceptionResponse(new
> NamedCacheNotFoundException(cacheName));
> +            if (log.isInfoEnabled()) log.info("Cache named {0} does
> not exist on this cache manager! Response ignored", cacheName);
> +	    return RequestIgnoredResponse.INSTANCE;
>          }
>       }
> 
> Index: core/src/main/java/org/infinispan/statetransfer/StateTransferManagerImpl.java
> ===================================================================
> --- core/src/main/java/org/infinispan/statetransfer/StateTransferManagerImpl.java	(revision
> 2443)
> +++ core/src/main/java/org/infinispan/statetransfer/StateTransferManagerImpl.java	(working
> copy)
> @@ -178,7 +178,7 @@
>    private void generateTransactionLog(ObjectOutput oo) throws Exception {
>       // todo this should be configurable
>       int maxNonProgressingLogWrites = 100;
> -      int flushTimeout = 60000;
> +      int flushTimeout = 600000;
> 
>       DistributedSync distributedSync =
> rpcManager.getTransport().getDistributedSync();
> 
> Cheers,
> Sanne
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


Does this patch affect any other tests?  It looks good to me... 

--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org







More information about the infinispan-dev mailing list