ntdb in Samba?

Andrew Bartlett abartlet at samba.org
Sat Mar 14 19:40:52 MDT 2015


On Sat, 2015-03-14 at 21:37 +0100, Jakub Hrozek wrote:
> > On 13 Mar 2015, at 09:27, Andrew Bartlett <abartlet at samba.org> wrote:
> >> 
> >> And to be honest, NTDB is technologically an incremental, not
> >> revolutionary enhancement.  Without the benefit of years of testing
> >> which TDB has.
> > 
> > I've wondered if you think it might help in ldb?  I've not done the
> > performance work to understand what (if anything) is 'slow', but have
> > pondered if backing on ntdb or Howard's lmdb would be worthwhile.
> > 
> > Andrew Bartlett
> 
> Hi,
> 
> I've done some work on a mdb-based ldb backend in my spare time:
> 	https://github.com/jhrozek/samba-ldb-mdb/tree/mdb

Very interesting!

> It's by no means complete, but I hope it would be in some time.
> There's also a big amount of duplication between the tdb and mdb back
> ends, but I was planning to remove the duplication only when I knew
> the new backend would be useful. 

I'm curious:  What made you start this, and do you have any early
indications of the advantages?

> Also, even if the mdb back end wasn't accepted by Samba, I think the
> small fixes in the ldb code, documentation and tests could still be
> useful.

Indeed.

> And while mentioning tests -- would Samba accept unit tests of the ldb
> API written using cmocka now that cmocka has a subunit output module?
> As far as I can see, the tests in tree mostly call the CLI ldb
> utilities, but don't test the API directly. I'm used to cmocka and I
> like it because it's lightweight yet powerful, but so far I've just
> added a cmocka-based test for my own code verification, so it would be
> nice to know if this part of my work could be merged to Samba at all.

API tests would be very valuable, and I would love to see what cmoka can
do for this.  I've not looked into this at all, but a real example is
always the best way to understand a new tool or feature.  I do like how
the cmoka tests look - they remind me very much of a cross between our
python tests and our better subunit-outputting torture tests.

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