[PATCH] Core ldb modules changes

Andrew Bartlett abartlet at samba.org
Thu Jan 17 23:25:05 GMT 2008

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

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

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

@@ -349,10 +368,10 @@ static int ldb_transaction_commit_internal(struct
ldb_context *ldb)
 	if (status != LDB_SUCCESS) {
 		if (ldb->err_string == NULL) {
 			/* no error string was setup by the backend */
-			ldb_asprintf_errstring(ldb, 
-						"ldb transaction commit: %s (%d)", 
-						ldb_strerror(status), 
-						status);
+			ldb_asprintf_errstring(ldb,
+					"ldb transaction commit: %s (%d)",
+					ldb_strerror(status),
+					status);
 	return status;

Andrew Bartlett

Andrew Bartlett
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20080118/9b430e98/attachment.bin

More information about the samba-technical mailing list