Correct handling of isRecycled

Matthieu Patou mat at
Mon Nov 14 10:44:24 MST 2011

On 11/11/2011 10:54, Stefan (metze) Metzmacher wrote:
> Hi Matthieu,
>>>>> I pushed here:
>>>> I think we need a better way to detect if we want to fix an object which
>>>> is stored broken,
>>>> maybe look for attributes which should be there if the object is only
>>>> DELETED and not an old style TOMBSTONE.
>>> Well here it's not fixing it's just removing objects that are not in
>>> the Deleted Object container, for sites and such it's a correct
>>> behavior to have them not in the Deleted Objects container.
> My comment was related to s4-kcc: Sets the isRecyled attributes on
> deleted entries when needed
> I think we need to be smarter and detect the need of isRecycled=TRUE
> based on the
> attributes which are present on the object.
> We could look at the replication metadata of the isDeteleted attribute
> and compare the originating usn, dsa-guid and timestamp with other the other
> deleted attributes. From this (I assume) we would be able to work out
> if isRecycled=TRUE should be there or not. As isRecycled=TRUE should only
> be there if all linked attributes are deleted (at the same time as
> isDeteleted
> was created). And also if there's no active attribute which should have
> been removed
> (because they're not in the preserved_attrs list nor the rdn attribute)
> when changing the object into tombstone/recycled object.
> And the same logic could be used to decide if we need isRecycled on
> incoming replication.
Ok so I added a tests for the absence of recycled only attribute: 
msDS-LastKnownRDN, the absence of this attribute plus the other test is 
a solid hint that the object is just a tombstone and so adding 
isRecycled=TRUE is the good move.

I just updated my branch.

Can you ack the patches ?

Matthieu Patou
Samba Team

More information about the samba-technical mailing list