TDB2 inclusion?

Stefan (metze) Metzmacher metze at samba.org
Fri Jun 3 06:42:39 MDT 2011


Hi Rusty,

> Now, I'm not committing to TDB2 stability at this stage, but integration
> would make my life simpler (vs. continually rebasing).  The major
> missing piece (other than debugging and tuning) is that I need to
> implement the ability to read and write TDB1 files.
> 
>         git://git.samba.org/rusty/samba.git #tdb2-wip

It would be really nice if we could get rid of the TDB_ALLOW_NESTING hack
and implement nested transactions correctly.

The API could look like this:

enum TDB_ERROR tdb_transaction_start(struct tdb_context *tdb,
				     uint64_t flags, /* we need a way to do a non-blocking start */
				     struct tdb_context **trans);

When we start a transaction this way, the 'tdb_context' of 'tdb' would
become read-only
until tdb_transaction_commit()/cancel() is called on the returned
'trans' context.

Also the users of the 'tdb' context would see the state before the
transaction.
This would reduce a lot of risks which can happen when using fake
transaction nesting
within one process together with nested event loops.

metze

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


More information about the samba-technical mailing list