Update ldb-perfs branch

Simo simo at samba.org
Tue Jun 9 07:26:48 MDT 2015


On Mon, 2015-06-08 at 22:54 -0700, Matthieu Patou wrote:
> On 06/07/2015 01:59 PM, Simo wrote:
> > On Sat, 2015-06-06 at 22:39 -0700, Matthieu Patou wrote:
> >> Hello All,
> >>
> >> I rebased and updated my branch related to ldb-perfs it's at
> >> https://git.samba.org/mat/?p=mat/samba.git;a=shortlog;h=refs/heads/ldb_perfs
> >>
> >> It pass make test on sn-devel.
> > Hi Mathieu,
> > the code looks mostly good but I am looking at ldn_dn_set_cadefolded()
> > and not really liking it. That API makes it way too easy to do great
> > damage.
> Well I added a big fat warning but I agree if you use it not wisely you 
> might feel the pain ...

Nobody read warnings, that's why I made the ldb_dn structure opaque and
had only specific setters and getters on it. :-)

> > Given you really need it only in ltdb_index_filter() to fetch a DN entry
> > knowing it was stored casefolded, I would rather introduce a function
> > like: ldb_dn_from_casefolded_ldb_val() (or even
> > ldb_dn_from_index_ldb_val) The implementation would share most of the
> > code with the original ldb_dn_from_ldb_val() and just add the casefolded
> > dn in the proper internal structure.
> > This way we avoid the risk of someone abusing ldn_dn_set_cadefolded() in
> > places where it shouldn't be.
> Ok I'll try to have a look at this soon, it didn't look too complicated.
> But as usual in this the devil is in the details. I'll keep everybody 
> informed.

Thanks a lot.

Simo.

-- 
Simo Sorce



More information about the samba-technical mailing list