directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <elecha...@gmail.com>
Subject Replication provider shutdown detection
Date Wed, 05 Dec 2012 17:58:13 GMT
Hi guys,

I have added a Pinger that check everyy N seconds if the provider is
still present. It uses the same connection than the consumer it checks,
and send a lookup request to the provider, requesting no attributes (1.1).

If the provider is not anymore present, we will get an error, and we
then will disconnect and restart the consumer.

It *should* work well, but we may have some potential race conditions. I
still have to formally determinate if I covered all the cases here, but
so far, it seems to be ok.

Another solution would have been to rely on the socket KEEP_ALIVE, and
when we timeout, we will eventually get a disconnection event. The
problem is that it's frequent on linux box to have a default keep-alive
set to 7200s, so we potentially can't detect the disconnection before 2
hours.

Anyone wanting to review the implementation can check on LdapServer,
ReplicationConsumerImpl and PingerThread classes.

-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com 


Mime
View raw message