[PATCH] make ldb-tdb multivalued attributes more efficient

Andrew Bartlett abartlet at samba.org
Wed Jun 14 09:51:22 UTC 2017


On Wed, 2017-06-14 at 16:11 +1200, Douglas Bagnall via samba-technical
wrote:
> Argh, wrong version.
> 
> This one has a touch more signing off and squashing.
> 
> Douglas
> 
> On 14/06/17 16:01, Douglas Bagnall wrote:
> > hi,
> > 
> > These patches improve the efficiency with which we check the
> > uniqueness constraints on multivalued attributes. Until now we have
> > always used an O(n^2) algorithm; with this we switch to O(n log n)
> > when there are more than 10 attributes.
> > 
> > It turned out this made the most noticeable difference with linked
> > attributes where the uniqueness checking is supposed to be handled by
> > the repl_meta_data module. This led to a few changes there to help it
> > to communicate its findings, thence to tests and miscellaneous changes
> > to error codes.
> > 
> > The first few patches are fixing whitespace and typos, which makes for
> > tedious reading. Sorry.
> > 
> > The patches are sort of looking towards a solution to
> > https://bugzilla.samba.org/show_bug.cgi?id=7485 -- that is, to use
> > schema-aware comparison functions rather than dumb case-sensitive
> > memcmp. The effect of that is the ldb context and a flags variable are
> > handed around where they aren't yet needed, with a view to avoiding an
> > ABI change.
> > 
> > Andrew Bartlett has already reviewed these, so don't feel the need to
> > review fully unless you are leaning toward a NACK.
> > 
> > cheers,
> > Douglas

Thanks Douglas,

I would note that this patch bumps the LDB version, because of the ABI.
 

The locking patches are 'just around the corner', but they have been
there for a number of weeks now and based on the latest feedback from
metze I won't have them ready this week either.

Therefore I don't suggest we wait for them.  

I realise this means a lot of LDB versions, but this close to the 4.7
freeze I'm keen we lock away each change so we can focus clearly,
rather than trying to land a big train all at once.

Thanks,

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