svn commit: samba r8736 - in branches/SAMBA_4_0/source/lib/ldb/ldb_tdb: .

tridge at samba.org tridge at samba.org
Sun Jul 24 12:38:42 GMT 2005


Author: tridge
Date: 2005-07-24 12:38:42 +0000 (Sun, 24 Jul 2005)
New Revision: 8736

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8736

Log:
this fixes the ldb speed (raises BENCH-WINS from 15 ops/sec to over 4000)

simo, we need to be careful to cope with this sort of direct dn query efficiently


Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c	2005-07-24 12:24:34 UTC (rev 8735)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c	2005-07-24 12:38:42 UTC (rev 8736)
@@ -461,6 +461,13 @@
 	struct ltdb_private *ltdb = module->private_data;
 	int ret;
 
+	/* it is important that we handle dn queries this way, and not
+	   via a full db search, otherwise ldb is horribly slow */
+	if (tree->operation == LDB_OP_EQUALITY &&
+	    ldb_attr_cmp(tree->u.equality.attr, "dn") == 0) {
+		return ltdb_search_dn(module, tree->u.equality.value.data, attrs, res);
+	}
+
 	if (ltdb_lock_read(module) != 0) {
 		return -1;
 	}



More information about the samba-cvs mailing list