summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-12-18 14:46:23 +0100
committerStefan Metzmacher <metze@samba.org>2013-01-01 19:28:06 +0100
commit5ecbc892b5226d3d31da2c62ae5261a8d8a73072 (patch)
tree4174209c2afb7af9c877f9280ba59dadbdaaa717 /source4/dsdb/samdb/ldb_modules
parentad43bb6086a7dbf48b405d0372ae85d2244384d9 (diff)
downloadsamba-5ecbc892b5226d3d31da2c62ae5261a8d8a73072.tar.gz
samba-5ecbc892b5226d3d31da2c62ae5261a8d8a73072.tar.bz2
samba-5ecbc892b5226d3d31da2c62ae5261a8d8a73072.zip
s4:dsdb/repl_meta_data: don't merge highwatermark and uptodatevector (bug #9508)
We should not do any magic regarding the highwatermark we got from the source dsa. We need to treat it as opaque and not try to be smart and merge it into the uptodatevector. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index b7d9248675..30b2a42d13 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -4529,7 +4529,7 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
*
* plus optional values from our old vector and the one from the source_dsa
*/
- nuv.ctr.ctr2.count = 1 + ouv.ctr.ctr2.count;
+ nuv.ctr.ctr2.count = ouv.ctr.ctr2.count;
if (ruv) nuv.ctr.ctr2.count += ruv->count;
nuv.ctr.ctr2.cursors = talloc_array(ar,
struct drsuapi_DsReplicaCursor2,
@@ -4577,43 +4577,6 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
}
/*
- * merge in the current highwatermark for the source_dsa
- */
- found = false;
- for (j=0; j < ni; j++) {
- if (!GUID_equal(&ar->objs->source_dsa->source_dsa_invocation_id,
- &nuv.ctr.ctr2.cursors[j].source_dsa_invocation_id)) {
- continue;
- }
-
- found = true;
-
- /*
- * here we update the highest_usn and last_sync_success time
- * because we're directly replicating from the source_dsa
- *
- * and use the tmp_highest_usn because this is what we have just applied
- * to our ldb
- */
- nuv.ctr.ctr2.cursors[j].highest_usn = ar->objs->source_dsa->highwatermark.tmp_highest_usn;
- nuv.ctr.ctr2.cursors[j].last_sync_success = now;
- break;
- }
- if (!found) {
- /*
- * here we update the highest_usn and last_sync_success time
- * because we're directly replicating from the source_dsa
- *
- * and use the tmp_highest_usn because this is what we have just applied
- * to our ldb
- */
- nuv.ctr.ctr2.cursors[ni].source_dsa_invocation_id= ar->objs->source_dsa->source_dsa_invocation_id;
- nuv.ctr.ctr2.cursors[ni].highest_usn = ar->objs->source_dsa->highwatermark.tmp_highest_usn;
- nuv.ctr.ctr2.cursors[ni].last_sync_success = now;
- ni++;
- }
-
- /*
* finally correct the size of the cursors array
*/
nuv.ctr.ctr2.count = ni;