[PATCH] Core ldb modules changes

simo idra at samba.org
Thu Jan 17 23:26:45 GMT 2008

On Fri, 2008-01-18 at 10:25 +1100, Andrew Bartlett wrote:
> On Thu, 2008-01-17 at 10:37 -0500, simo wrote:
> > This is a new patch[1] to the core ldb internal async API to address some
> > issue that were preventing me from using ldb in a full async server.
> > The next step will be to add support to replace the run queue now
> > attached to the ldb context with an event system and completely stop
> > using the ldb_wait() call in fully async code calling code.
> > Before committing I will finish porting the dsdb modules to this
> > interface, but I thought that people may be interested in commenting and
> > understanding the direction I want to take with this code.
> > 
> > Simo.
> > 
> > [1] Patch here as it is a bit too big for the list:
> > http://samba.org/~idra/patches/0001-This-commit-changes-in-some-key-areas-the-way-ldb-mo.patch
> > 
> > Also git tree here: git://git.samba.org/idra/samba.git
> > branch v4-0-ldb-async
> - search request callbacks MUST not issue new requests until the
>   LDB_REPLY_DONE ldb_reply is received. Once this reply is received a
>   module can issue a new request or return to the upper module using
>   ldb_module_done()
> Why do you want this restriction?  In a number of modules, this pattern
> has allowed an easy, asynchronous handling of some difficult situations
> (such as handling subtree renames, without building massive lists in
> memory). 

Which only worked by chance because ldb_tdb ws async and giving back
results before the former request was done (this does not happen anymore
now even with ldb_tdb).

It simply does not work.

> There is also a lot of noise in your patch - and while I'm as guility as
> anyone in this department, it does make it much harder to see the real
> changes:

I know, but I took the chance to also reformat where necessary to make
the code more understandable to me while reading it.

I guess you can patch a tree and the use diff with fuzzy options to
ignore white space changes only eventually


Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Senior Software Engineer at Red Hat Inc. <ssorce at redhat.com>

More information about the samba-technical mailing list