[WIP][PATCH] Remove nested transactions by default

Stefan Metzmacher metze at samba.org
Thu Jun 29 07:33:25 UTC 2017

Am 28.06.2017 um 08:23 schrieb Andrew Bartlett:
> I had left this aside, but being on the home stretch for the locking
> patches I wanted to raise the issue of the LDB transaction semantics.
> ldb's current transaction semantics are (frankly) a little odd.
> If we have a nested transaction, eg:
> - start transaction
>   - start transaction
>   - operation
>   - cancel transaction 
> - end transaction
> Then the cancel transaction is just ignored!

I think in the long run we want real nested transactions it should be
relatively easy to add that to tdb.

struct tdb_transaction needs to be a list
and struct tdb_methods should get some more hooks,
so that we avoid the recovery aread and fsync on nested transactions.

> Internally there are also many layers of reference counting that while
> currently correct feel ripe for challenges in the future. 
> This patch set removes the ability to nest transactions by default,
> using it only for a special case in the join. 
> I don't want to derail the locking patches, but I also thought 'if we
> are going to break the behaviours, why not get rid of this'. 
> Thoughts welcome.  I suspect we should just leave this for after 4.7,
> but it is presented for comment. 

I think we can include the two tdb patches in the ldb-safe-locking branch.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170629/8813fbe5/signature.sig>

More information about the samba-technical mailing list