[PATCH] GUID index for LDB

Andrew Bartlett abartlet at samba.org
Thu Sep 7 00:03:27 UTC 2017


On Thu, 2017-09-07 at 01:53 +0200, Stefan Metzmacher wrote:
> Am 07.09.2017 um 01:46 schrieb Andrew Bartlett:
> > 
> > Correct, I move all the objects to allow (as should have been
> > originally designed) the values in the index to be trivially
> > converted
> > into TDB keys. 
> 
> And how does the upgrade/downgrade works then?

Via the re-index.  The upgrade operates because until 

dn: @INDEXLIST
@IDXGUID: objectGUID

is set, the old DB format is still used.

At startup, Samba modifies @INDEXLIST to match the expected values, so
will then re-index. 

The downgrade works because you can still edit the @INDEXLIST (as these
are not GUID base) in an older ldb version and remove @IDXGUID,
provided you get the patches in the other thread.  

The re-index renames all the records. 

Downgrade to earlier versions without first doing that remains possible
via ldbdump as it considers every record to be a possible ldb entry,
regardless of the key.

Finally, for Samba I'll add a script to do the @INDEXLIST edit for
Samba's multi-database tree.

> > > 
> > > I noticed that...
> > 
> > I've fixed a couple of issues and am tidying that up today.  I've
> > verified it allows a downgrade of a backend TDB by editing
> > @INDEXLIST,
> > which could then be followed by a dbcheck --reindex.  
> > 
> > This is helpful if folks downgrade from 4.8 to 4.7 and forget the
> > run
> > the (to be written) downgrade script first. 
> 
> Can you explain the upgrade/downgrade and the overall design changes
> in explicit/verbose text form?

I'll put that in the release commit message and in the top of the
ldb_index.c file. 

Thanks for your interest!

Andrew Bartlett

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



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 862 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170907/e7617197/signature.sig>


More information about the samba-technical mailing list