[PATCH] do a partial replication with drs replicate --local

Stefan Metzmacher metze at samba.org
Thu Feb 2 06:59:41 UTC 2017


Hi Bob,

> "samba-tool drs replicate --local" would previously always do a full
> replication, as replicate() would always use a highwatermark with all 0s
> and no uptodateness_vector. These patches let replicate() optionally
> take a highwatermark and an uptodateness_vector, and make drs replicate
> --local send the appropriate one by default. They also include a test
> for this. This allows us to manually pull only changes to a server which
> isn't yet joined to the domain.
> 
> One potential issue is: should the default behavior be to do a partial
> replication, or a full replication? Previously, it was a full
> replication, whereas these patches change it to a partial replication
> (this is trivial to change).
> 
> Please review and push if appropriate.

We should not construct a highwatermark on the client side!
You need to check if we have a repsFrom for the current dc
and get the highwatermark from there, otherwise we need to send an
empty highwater mark and just rely on the uptodatevector.

The uptodatevector also needs an entry for our self,
basically the logic from dsdb_load_udv_v2().

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170202/ab3cb3d8/signature.sig>


More information about the samba-technical mailing list