]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4-dsdb: Remove support for per-partition sequence numbers
authorAndrew Bartlett <abartlet@samba.org>
Sat, 11 Aug 2012 01:00:53 +0000 (11:00 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 11 Aug 2012 02:53:42 +0000 (12:53 +1000)
These sequence numbers were only used for telling if the schema was
changed, and are no longer directly related to the replication USN.

The per-partition replication USN can be obtained from the
@REPLCHANGED record on the per-partition database, and this is done
with an ldb_search().

Andrew Bartlett

source4/dsdb/samdb/ldb_modules/partition.c

index f980b67b26e49d6dd3cd12bd2d8b84444ca9a924..435a791f1c585182627e9584078078b71c0d4683 100644 (file)
@@ -1058,14 +1058,6 @@ int partition_sequence_number_from_partitions(struct ldb_module *module,
                                             ldb_extended_default_callback,
                                             NULL);
                LDB_REQ_SET_LOCATION(treq);
-               if (ret != LDB_SUCCESS) {
-                       talloc_free(res);
-                       return ret;
-                       }
-               
-               ret = ldb_request_add_control(treq,
-                                             DSDB_CONTROL_CURRENT_PARTITION_OID,
-                                             false, data->partitions[i]->ctrl);
                if (ret != LDB_SUCCESS) {
                        talloc_free(res);
                        return ret;
@@ -1116,21 +1108,6 @@ static int partition_sequence_number(struct ldb_module *module, struct ldb_reque
                break;
 
        case LDB_SEQ_HIGHEST_SEQ:
-
-               /* 
-                * We can only query per-partition the individual
-                * partition sequence number, so we don't need to run
-                * this reload for every query of the next global seq
-                * number 
-                */
-               p = find_partition(data, NULL, req);
-               if (p != NULL) {
-                       /* the caller specified what partition they want the
-                        * sequence number operation on - just pass it on
-                        */
-                       return ldb_next_request(p->module, req);
-               }
-
                ret = partition_metadata_sequence_number(module, &seq_number);
                if (ret != LDB_SUCCESS) {
                        return ret;