Using TDB for glib/gobject applications

tridge at tridge at
Thu Jun 25 00:15:29 MDT 2009

Hi Simo,

 > I am currently experimenting with serialization in another project
 > (nothing published yet, still prototyping), and if you use tevent_req
 > and async calls to enter a transaction then things get easier.

If you are talking about making every single use of the ldb API in
Samba be async then you are just plain crazy.

ldb was made async to give improved efficiency for a fairly
unimportant case (a slow ldap backend to ldb). It has always been and
will always be completely pointless when we use the tdb backend, as
that is always sync.

To now require that we rewrite all the application level login in
Samba to make it async because we now have an async ldb API is
madness. Making our samr server, lsa server, drs server etc all based
on callbacks would make the code MUCH more complex and much harder to
debug. Each RPC operation involves far too many ldb calls to make this
an easy conversion.

Making a library async is supposed to help us solve problems, not
create them!

I'd rather go the other way and provide a guarantee that every single
non-async ldb_*() call guarantees it will not allow any other events
to trigger while it is running, and the same for any group of
operations called within a transaction. That will give us the
serialisation we need while not making us rewrite half our code.

Cheers, Tridge

More information about the samba-technical mailing list