From 603310accdecaf987586e18a8c2b90a931409d03 Mon Sep 17 00:00:00 2001 From: Aaron Haslett Date: Wed, 9 Jan 2019 16:22:40 +1300 Subject: [PATCH] dns: changing onelevel search for wildcard to subtree SCOPE_ONELEVEL is used on wildcard dns searches, but onelevel searches currently have a performance problem related to GUID indexing, so this patch changes the search scope to SCOPE_SUBTREE. In this case, as the onelevel and subtree sets of records are roughly the same, and the query is matching against the DN itself, we don't believe there's any benefit in using SCOPE_ONELEVEL over SCOPE_SUBTREE. The onelevel performance problem will be fixed separately later, but in the meantime this solves the DNS performance problem. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13738 Signed-off-by: Aaron Haslett Reviewed-by: Douglas Bagnall Reviewed-by: Gary Lockyer (cherry picked from commit ef379880037c10589ceeab7f985e3245817908a4) --- source4/dns_server/dnsserver_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/dns_server/dnsserver_common.c b/source4/dns_server/dnsserver_common.c index cc24a6c..e76cc09 100644 --- a/source4/dns_server/dnsserver_common.c +++ b/source4/dns_server/dnsserver_common.c @@ -482,7 +482,7 @@ static int dns_wildcard_lookup(struct ldb_context *samdb, samdb, frame, parent, - LDB_SCOPE_ONELEVEL, + LDB_SCOPE_SUBTREE, query, attrs, NULL, -- 2.7.4