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 Lécharny <el...@gmail.com> on 2013/01/13 15:03:05 UTC

Replica duplicates detection...

Hi !

what should we do if we get a replication request from a host we already
know, with the same search filter, but an empty cookie ?

We have two cases here :

1) We already have a connected consumer from this host with the given
search filter
It's very likely the consumer has been disconnected, but we haven't yet
noticed the disconnection. However, it may also be another consumer on
the same host...

Should we consider it's a new consumer ? I bet so...

2) We don't have a connected consumer from this host
Most certainly, the consumer is trying to reconnect. ATM, we create a
new ReplicaEventLog, and we consider that's a new consumer. We keep the
old journal and create a new journal.

Won't it be better to consider that it's the same consumer ? Should'nt
we reset the old journal?

OTOH we *may* have ore than once consumer on the same host, so e may
want to have more than one journal... In any case, we will eventually
detect that the disconnected consumer is dead, and we will remove the
old journal.

I do think that in this case, keeping the journal is probably necessary,
assuming we have a mechanism that get rd of it after a period of
inactivity, and without a reconnection from the consumer (ie, a
connection with a valid cookie).

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