You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lecharny <el...@gmail.com> on 2011/08/02 22:51:10 UTC

Replication fallback question

Hi,

I have a technical question :

what happens if we try to send a replicated entry, expecting that the 
consumer is present, but is disconnected just while writing the entry in 
this method :

     private void handleWriteFuture( WriteFuture future, Entry entry, 
EventType event, SyncModifyDn modDnControl )
     {
         // Let the operation be executed.
         // Note : we wait 10 seconds max
         future.awaitUninterruptibly(); <<<<---- here

         if ( !future.isWritten() )
         {

?

I'm afraid that we will remain locked forever in the 
awaitUninterruptibly call.

Now, if we add a timeout, I have another question : the timeout might be 
reached, but the consumer is still consumer. Do we have a mechanism that 
check regularly that the consumer is not back again (I mean, available)?

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: Replication fallback question

Posted by Kiran Ayyagari <ka...@apache.org>.
On Wed, Aug 3, 2011 at 2:21 AM, Emmanuel Lecharny <el...@gmail.com> wrote:
> Hi,
>
> I have a technical question :
>
> what happens if we try to send a replicated entry, expecting that the
> consumer is present, but is disconnected just while writing the entry in
> this method :
>
>    private void handleWriteFuture( WriteFuture future, Entry entry,
> EventType event, SyncModifyDn modDnControl )
>    {
>        // Let the operation be executed.
>        // Note : we wait 10 seconds max
>        future.awaitUninterruptibly(); <<<<---- here
>
>        if ( !future.isWritten() )
>        {
>
> ?
>
yet to test this scenario completely, I mean we do handle many
variants of this case related to broken connection but the above
mentioned
needs further simulation and testing to choose a better handling
strategy than the currently existing one if required.
> I'm afraid that we will remain locked forever in the awaitUninterruptibly
> call.
>
> Now, if we add a timeout, I have another question : the timeout might be
> reached, but the consumer is still consumer. Do we have a mechanism that
> check regularly that the consumer is not back again (I mean, available)?
>
yes in this case we turn back the flag 'pushInRealTime' on so that
events can be pushed in real time

> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>



-- 
Kiran Ayyagari