From: Aaron Haslett Date: Wed, 9 Jan 2019 03:22:40 +0000 (+1300) Subject: dns: changing onelevel search for wildcard to subtree X-Git-Tag: samba-4.8.9~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8dc1d8c431add361fa20853f98746fb137b24d14;p=thirdparty%2Fsamba.git 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) --- diff --git a/source4/dns_server/dnsserver_common.c b/source4/dns_server/dnsserver_common.c index 0dedf689cef..04f8eeab7bf 100644 --- a/source4/dns_server/dnsserver_common.c +++ b/source4/dns_server/dnsserver_common.c @@ -481,7 +481,7 @@ static int dns_wildcard_lookup(struct ldb_context *samdb, samdb, frame, parent, - LDB_SCOPE_ONELEVEL, + LDB_SCOPE_SUBTREE, query, attrs, NULL,