[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: syncrepl ramblings again

> I'd also like to see syncrepl consumer extended to support other content
> synchronization methods than LDAPsync so that slapd(8) can be a slave
> of most any LDAP server.   For instance, it would be great if one could
> setup a consumer to use simple LDAP searches (using time stamps to
> traffic) to suck data of some non-LDAPsync provider)...  or suck entries
> out of a changelog... or whatever.

Assuming that entryCSN and entryUUID are supported by an LDAP server,
a possible approach to generic slapd sync consumer is:

(1) Search for (&(original filter)(entryCSN<clientCookie)) asking only
entryUUID and entryCSN attributes
(2) Delete replica entries not returned by (1)
(3) Search for (&(original
      asking replicated attributes + entryUUID + entryCSN,
      where maxCSN(1) is the maximum entryCSN returned in step (1)
(4) Update clientCookie to maxCSN(1)

As a result, replica is synchronized to the point maxCSN(1)

This in fact emulates the present mode LDAPsync operation without LDAPsync
support in the provider side.