From: Andrew Bartlett Date: Thu, 9 Aug 2012 05:16:37 +0000 (+1000) Subject: s4-dsdb: Do not reload partition metadata except on transaction start X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=8dd09ef46dee1056e1ea029375a250b12dacae10;p=mdw%2Fsamba.git s4-dsdb: Do not reload partition metadata except on transaction start This ensures that we do not add objects that should go into a partition, but we simply return that an object is not present if the connection was created before the partition was loaded. It is rare to create a new partition. Andrew Bartlett --- diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c index 4a9216bb10..f980b67b26 100644 --- a/source4/dsdb/samdb/ldb_modules/partition.c +++ b/source4/dsdb/samdb/ldb_modules/partition.c @@ -549,12 +549,6 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req) int ret; bool domain_scope = false, phantom_root = false; - /* see if we are still up-to-date */ - ret = partition_reload_if_required(module, data, req); - if (ret != LDB_SUCCESS) { - return ret; - } - p = find_partition(data, NULL, req); if (p != NULL) { /* the caller specified what partition they want the @@ -1129,11 +1123,6 @@ static int partition_sequence_number(struct ldb_module *module, struct ldb_reque * this reload for every query of the next global seq * number */ - ret = partition_reload_if_required(module, data, req); - if (ret != LDB_SUCCESS) { - return ret; - } - p = find_partition(data, NULL, req); if (p != NULL) { /* the caller specified what partition they want the