diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-01-21 07:57:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:51:20 -0500 |
commit | b19ca85e97bf1eddaa944655b66dadd428688d7e (patch) | |
tree | 5890b5bbc0fa9f3f571d9fd433ba7147e9f46ef9 /source4 | |
parent | 1052673fa64a4834dae129a227c9122975809ab9 (diff) | |
download | samba-b19ca85e97bf1eddaa944655b66dadd428688d7e.tar.gz samba-b19ca85e97bf1eddaa944655b66dadd428688d7e.tar.bz2 samba-b19ca85e97bf1eddaa944655b66dadd428688d7e.zip |
r13059: stop playing ping-pong while replicating special group records,
if the addresses and their owners are idetical to the old record
and we're the owner of the old record then we should just gnore the replica
metze
(This used to be commit e4f823ef038eeb74a8a6de05207f2f9aae7262a1)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/wrepl_server/wrepl_apply_records.c | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/source4/wrepl_server/wrepl_apply_records.c b/source4/wrepl_server/wrepl_apply_records.c index 0eab6484c8..f41957a210 100644 --- a/source4/wrepl_server/wrepl_apply_records.c +++ b/source4/wrepl_server/wrepl_apply_records.c @@ -415,8 +415,8 @@ static enum _R_ACTION replace_unique_owned_vs_X_replica(struct winsdb_record *r1 } if (!R_IS_ACTIVE(r2)) { - /* NOT REPLACE */ - return R_NOT_REPLACE; + /* NOT REPLACE, and PROPAGATE */ + return R_DO_PROPAGATE; } if (R_IS_GROUP(r2) || R_IS_SGROUP(r2)) { @@ -494,8 +494,8 @@ static enum _R_ACTION replace_group_owned_vs_X_replica(struct winsdb_record *r1, } } - /* NOT REPLACE */ - return R_NOT_REPLACE; + /* NOT REPLACE, but PROPAGATE */ + return R_DO_PROPAGATE; } /* @@ -551,14 +551,17 @@ static enum _R_ACTION replace_sgroup_owned_vs_X_replica(struct winsdb_record *r1 } if (!R_IS_SGROUP(r2) || !R_IS_ACTIVE(r2)) { - /* NOT REPLACE */ - return R_NOT_REPLACE; + /* NOT REPLACE, but PROPAGATE */ + return R_DO_PROPAGATE; } - /* - * TODO: should we have the same logic here like in - * replace_sgroup_replica_vs_X_replica() ? - */ + if (r_1_is_same_as_2_address_list(r1, r2, True)) { + /* + * as we're the old owner and the addresses and their + * owners are identical + */ + return R_NOT_REPLACE; + } /* not handled here: MERGE */ return R_DO_SGROUP_MERGE; @@ -624,8 +627,8 @@ static enum _R_ACTION replace_mhomed_owned_vs_X_replica(struct winsdb_record *r1 } if (!R_IS_ACTIVE(r2)) { - /* NOT REPLACE */ - return R_NOT_REPLACE; + /* NOT REPLACE, but PROPAGATE */ + return R_DO_PROPAGATE; } if (R_IS_GROUP(r2) || R_IS_SGROUP(r2)) { @@ -1341,15 +1344,6 @@ static NTSTATUS wreplsrv_apply_one_record(struct wreplsrv_partner *partner, action = replace_mhomed_owned_vs_X_replica(rec, replica); break; } - - /* - * if we own the local record, and it should not be replaced - * then propagate the conflict result back to the other - * wins servers - */ - if (action == R_NOT_REPLACE) { - action = R_DO_PROPAGATE; - } } DEBUG(4,("apply record %s: %s\n", @@ -1367,7 +1361,7 @@ static NTSTATUS wreplsrv_apply_one_record(struct wreplsrv_partner *partner, return r_do_challenge(partner, mem_ctx, rec, owner, replica); case R_DO_RELEASE_DEMAND: return r_do_release_demand(partner, mem_ctx, rec, owner, replica); - case R_DO_SGROUP_MERGE: + case R_DO_SGROUP_MERGE: return r_do_sgroup_merge(partner, mem_ctx, rec, owner, replica); } |