[infinispan-dev] CommandAwareRpcDispatcher desired logic

Pedro Ruivo pedro at infinispan.org
Wed May 29 10:41:45 EDT 2013


Hi,

I'm adding Bela in CC for a quick question:

We are doing a UnicastRequest and register a FutureListener. The 
FutureListener is not being notified if the timeout expires. Is this normal?

@Dan: other comments inline

Cheers,
Pedro

On 05/29/2013 03:06 PM, Dan Berindei wrote:
>
>
>
> On Wed, May 29, 2013 at 4:50 PM, Pedro Ruivo <pedro at infinispan.org
> <mailto:pedro at infinispan.org>> wrote:
>
>
>
>     #2 testTimeout() => tests the timeout when a ResponseFilter is used. It
>     sets the timeout to 1000 milliseconds and sends a command that sleeps
>     for 5000 millisecond before reply. This test is failing because no
>     TimeoutException was thrown (as expected). That's why I've created
>     ISPN-3100.
>
>     *question* is the desired behaviour to wait infinitely? If yes, then
>     ISPN-3100 is invalid.
>
>
> I'm pretty sure that's not intentional. FutureCollator.futureDone()
> should be called when a UnicastRequest finishes with a TimeoutException
> and it should decrement expectedResponses. When all the UnicastRequests
> are done, it should notify() the caller thread, which should throw a
> TimeoutException.

The problem is the FutureCollactor is not receiving any notification 
about the any timeout. So I think we have to check for the timeout 
expiration in the FutureCollactor (if the answer from Bela is "yes").

>
>     #3 testTimeoutWithoutFilter() => tests the timeout without a filter.
>     It's working correctly!
>
>     Thanks!
>
>     Cheers,
>     Pedro
>
>     [1]
>     https://github.com/pruivo/infinispan/commit/1fc26d740b773bf3864298615f61ca57b964d9cf#diff-0
>     _______________________________________________
>     infinispan-dev mailing list
>     infinispan-dev at lists.jboss.org <mailto:infinispan-dev at lists.jboss.org>
>     https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>


More information about the infinispan-dev mailing list