summaryrefslogtreecommitdiff
path: root/source4/dsdb/repl
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-01-16 11:49:09 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-16 14:10:43 +1100
commit8342d08f5c3ffd02f54c5d5ace9e76cf551acb51 (patch)
treeabba47337bdfbaf2d96670f3643ddc91e09e1af6 /source4/dsdb/repl
parentdb7eba7080e3f60da6751d638a31eaf3e36c9b12 (diff)
downloadsamba-8342d08f5c3ffd02f54c5d5ace9e76cf551acb51.tar.gz
samba-8342d08f5c3ffd02f54c5d5ace9e76cf551acb51.tar.bz2
samba-8342d08f5c3ffd02f54c5d5ace9e76cf551acb51.zip
s4-dsdb: take advantage of local cursor and sort
in getncchanges and repl task we don't need the extra load and sort any more.
Diffstat (limited to 'source4/dsdb/repl')
-rw-r--r--source4/dsdb/repl/drepl_partitions.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/source4/dsdb/repl/drepl_partitions.c b/source4/dsdb/repl/drepl_partitions.c
index 6687effe6d..b57a5c81c0 100644
--- a/source4/dsdb/repl/drepl_partitions.c
+++ b/source4/dsdb/repl/drepl_partitions.c
@@ -212,40 +212,6 @@ static WERROR udv_convert(TALLOC_CTX *mem_ctx,
return WERR_OK;
}
-/*
- add our local UDV element for the partition
- */
-static WERROR add_local_udv(struct dreplsrv_service *s,
- struct dreplsrv_partition *p,
- const struct GUID *our_invocation_id,
- struct drsuapi_DsReplicaCursorCtrEx *udv)
-{
- int ret;
- uint64_t highest_usn;
- int i;
-
- ret = dsdb_load_partition_usn(s->samdb, p->dn, &highest_usn, NULL);
- if (ret != LDB_SUCCESS) {
- /* nothing to add */
- return WERR_OK;
- }
-
- for (i=0; i<udv->count; i++) {
- if (GUID_equal(our_invocation_id, &udv->cursors[i].source_dsa_invocation_id)) {
- udv->cursors[i].highest_usn = highest_usn;
- return WERR_OK;
- }
- }
-
- udv->cursors = talloc_realloc(p, udv->cursors, struct drsuapi_DsReplicaCursor, udv->count+1);
- W_ERROR_HAVE_NO_MEMORY(udv->cursors);
-
- udv->cursors[udv->count].source_dsa_invocation_id = *our_invocation_id;
- udv->cursors[udv->count].highest_usn = highest_usn;
- udv->count++;
-
- return WERR_OK;
-}
static WERROR dreplsrv_refresh_partition(struct dreplsrv_service *s,
struct dreplsrv_partition *p)
@@ -296,9 +262,6 @@ static WERROR dreplsrv_refresh_partition(struct dreplsrv_service *s,
W_ERROR_NOT_OK_RETURN(status);
}
- status = add_local_udv(s, p, samdb_ntds_invocation_id(s->samdb), &p->uptodatevector_ex);
- W_ERROR_NOT_OK_RETURN(status);
-
orf_el = ldb_msg_find_element(r->msgs[0], "repsFrom");
if (orf_el) {
for (i=0; i < orf_el->num_values; i++) {