dns: changing onelevel search for wildcard to subtree
authorAaron Haslett <aaronhaslett@catalyst.net.nz>
Wed, 9 Jan 2019 03:22:40 +0000 (16:22 +1300)
committerKarolin Seeger <kseeger@samba.org>
Mon, 14 Jan 2019 09:21:31 +0000 (10:21 +0100)
commitd1027b4b8e65d8bede4e4fb9316c484f941f6b2a
treec55253a7062ad3224a7e4b0ae28888d92667ed94
parent1d927b23f63b2fce29416dc94445d3c7171d96da
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 <aaronhaslett@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
(cherry picked from commit ef379880037c10589ceeab7f985e3245817908a4)
source4/dns_server/dnsserver_common.c