[PATCH] ldb: Compare the DNs in consideration of the tree structure.

Andrew Bartlett abartlet at samba.org
Thu Dec 7 18:11:24 UTC 2017


On Thu, 2017-12-07 at 15:02 +0100, Bjoern Baumbach via samba-technical
wrote:
> Hi!
> 
> Please find a patch attached which improves the comparison of DNs, which
> can be used to sort DNs in a convenient way.
> 
> Please review and push.

I understand the motivation here, however I'm concerned about the cost.

In particular, this makes changes such that LDB will look up the schema
and re-calculate the comparison rather than use the casefolded value.  

I'm quite concerned that, on a large database, this could be quite
significant.

Likewise, you seem to change the strcmp() on the casefolded attribute
name to be a strcasecmp() (under the guise of ldb_attr_cmp()), this is
simply wasteful. 

I appreciate your motivations here, however I don't think this can go
in as-is.  It may be that we need to separate the callers that desire
structured equality from those that simply desire equal/not-equal. 

Sorry,

Andrew Bartlett
-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba-technical mailing list