directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <>
Subject Re: About message response handling in the API
Date Fri, 05 Feb 2010 02:03:53 GMT
> I think we have a huge problem in the current ldap-api implementation.
> Currently, when we send a request, we cretae an associated Future in which
> we store a response queue we have created to store the response when it will
> arrive. So far, so good.
> The problem is that we need to associate an incoming response to the Future
> it is targeting. To do so we have a FutureMap<int, Future>, and as every
> response has the same MessageId than the associated request, we can easily
> find which request a response is associated to.
> So when we get a response, we extract its messageId, do a lookup in the
> futureMap and get back the Future, then we update the queue with the
> response. The client which is doing a future.get() will then get its
> response.
> Now, we could perfectly unbind, and rebind immediately. What happens ? The
> session is then closed, and all responses we are waiting for will be
> discarded. First big bug here : we don't cleanup the futureMap.
> Another case : instead of unbinding, we send an abandon request. It seems
> that we clean up the futureMap.
> Last, not least, we can re-bind. In this case, the connection is not reset,
> but we start with a new MessageId, starting at 1. And we have another bug
> here : we don't cleanup the futureMap.
> So we have to check all those cases and fix them.


right now I don't have access to the code, will take a look at these
issues, and am sure
as you said during unbind only the futureMap is cleaned atm

thanks Emmanuel

Kiran Ayyagari

View raw message