patches for time limited getncchanges

Matthieu Patou mat at matws.net
Tue Nov 22 17:39:13 MST 2011


Hello,

On 22/11/2011 20:38, Matthieu Patou wrote:
> On 21/11/2011 20:30, Stefan (metze) Metzmacher wrote:
>> Hi Matthieu,
>>
>> I've pushed my latest version of it here:
>> https://gitweb.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master4-tmp3 
>>
>>
>>> I squashed what was needed and added the needed code for
>>> replmd_replicated_apply_merge, I pushed all the code in my repo in the
>>> drs branch:
>>> http://git.samba.org/?p=mat/samba.git;a=shortlog;h=refs/heads/drs
>>>
>>> I think it should be ok, it does the job both (in term of adding the
>>> isRecycled) for new objects and updated objects.
>> I think we need to test how replication works if an object is restored.
>>
>> Does it just work by removing the 'isDeleted' attribute or by setting it
>> to 'FALSE'?
> As I tested and as this page 
> (http://technet.microsoft.com/en-us/library/dd392261%28WS.10%29.aspx) 
> indicate it's globaly, you replace the DN and you remove the isDeleted 
> attribute.
>> In case of replication I guess the meta data stamp for 'isDeleted' will
>> always be
>> there, so checking for the existence of the related stamp, may not 
>> indicate
>> the object has isDeleted: TRUE.
> Right, that's why It was the correct move to test if the recycle-bin 
> is enabled because if it's the case then we shouldn't do anything 
> while replicating or in the kcc.
>
>>
>> In replmd_replicated_apply_merge() we also need to cover the case, where
>> the isDeleted: TRUE is already in the local ldb.
>>
>> I think we need to calculate how the new object will look like first
>> and then check if we still need to add isRecycled: TRUE.
> I don't think it's needed, if we are replicating for the first time  a 
> deleted object, we just check it hasn't the isRecycled attribute and 
> also hasn't the lastknownRDN and the recyclebin is not activated.
> For a replication bringing the tombstone (isDeleted=TRUE) state to an 
> object that we already know we have to check that the same rules and 
> set the isRecycled, for all the other cases we do not need to do 
> something.
>
>
So I pushed the modified version, basically when we replicate we check 
for the value of isDeleted (and not only the presence of it as you 
pointed it, it can be just a sign that it was deleted). When we 
replicate for the first time an object if it has isDeleted = TRUE and 
not isRecycled and not lastKnownRDN then we set isRecycled=TRUE.
When we replicate an already known object and if the recycle bin is not 
enabled and if we have the isDeleted and isDeleted=TRUE and not 
isRecycled and not lastKnownRDN then we set isRecycled=TRUE, the extra 
precaution with the recycle-bin should insure that we stay in simple 
cases and also we do not need to add isRecycled while replicating when 
the recycle-bin is enabled whatever the value of isDeleted is.

As usual the branch is here: 
http://git.samba.org/?p=mat/samba.git;a=shortlog;h=refs/heads/drs

Matthieu.



>>
>> metze
>>
> Matthieu.
>



More information about the samba-technical mailing list