s4-dsdb: Do not reload partition metadata except on transaction start
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Aug 2012 05:16:37 +0000 (15:16 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 9 Aug 2012 08:01:04 +0000 (10:01 +0200)
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

source4/dsdb/samdb/ldb_modules/partition.c

index 4a9216bb10132497e01b2558e550154c433f8443..f980b67b26e49d6dd3cd12bd2d8b84444ca9a924 100644 (file)
@@ -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