[infinispan-dev] Why does ClusteredGetResponseValidityFilter maintain pendingResponders?

Manik Surtani manik at jboss.org
Thu Jul 9 07:13:03 EDT 2009


On 9 Jul 2009, at 12:08, Bela Ban wrote:

> What's the issue here ?

The issue is that the RspFilter never finds a valid response (assume  
that this is because the "right answer" does not exist).  In this  
case, needMoreResponses() would always return true.  I remember that  
in JBC3, when this happened, JGroups timed out waiting for responses  
even though all responses had come in; the filter just rejected all of  
them.

I found that the workaround was for needMoreResponses() to return true  
if we hadn't found the right answer AND there were more responses we  
hadn't considered yet.  Otherwise return false, since you know there  
are no more responses to consider anyway.

>
> You return true from RspFilter.needMoreResponses(), but you don't  
> *have* more responses available ?
>
>
> Galder Zamarreno wrote:
>>
>>
>> On 07/07/2009 02:03 PM, Manik Surtani wrote:
>>>
>>> On 7 Jul 2009, at 08:03, Galder Zamarreno wrote:
>>>
>>>> Hi all,
>>>>
>>>> Why does ClusteredGetResponseValidityFilter maintain a list of
>>>> pendingResponders? Wouldn't it be more efficient if
>>>> needMoreResponses() returned as soon as one positive response has  
>>>> been
>>>> received regardless of who's pending to return anything? I'm  
>>>> assuming
>>>> here that SuccessfulResponse means that the clustered get returned
>>>> what we're trying to get.
>>>
>>> IIRC this was an issue where if we hadn't seen any valid responses,
>>> JGroups would timeout. So needMoreReponses() needed to return true  
>>> at
>>> some point, and in this case that point is if we don't have a valid
>>> response AND there are more pending responders.
>>>
>>> This may not be the case anymore with JGroups 2.8 though.
>>
>> Hmmmmmm, not sure I understand. Vladimir/Bela, can you clarify this?
>>
>> As a FYI: This came from the stoppgaes I see in DIST mode where  
>> some clustered get responses are somehow not getting through (see  
>> "Sometimes TCP responses not getting through on localhost" titled  
>> email sent to this dev list). While looking at that  
>> ClusteredGetResponseValidityFilter was waiting for one node to  
>> respond even if it had already received a successful response to  
>> the clustered get.
>>
>>>
>>>> I implemented a very similar thing for HAJNDI in such way that as  
>>>> soon
>>>> as a look up had succeed, we wouldn't wait for anyone else.
>>>>
>>>> Cheers,
>>>> -- 
>>>> Galder Zamarreño
>>>> Sr. Software Engineer
>>>> Infinispan, JBoss Cache
>>>> _______________________________________________
>>>> infinispan-dev mailing list
>>>> infinispan-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>
>>> -- 
>>> Manik Surtani
>>> manik at jboss.org
>>> Lead, Infinispan
>>> Lead, JBoss Cache
>>> http://www.infinispan.org
>>> http://www.jbosscache.org
>>>
>>>
>>>
>>>
>>
>
> -- 
> Bela Ban
> Lead JGroups / Clustering Team
> JBoss (by Red Hat)
>

--
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