svn commit: samba r13059 - in branches/SAMBA_4_0/source/wrepl_server: .

metze at samba.org metze at samba.org
Sat Jan 21 07:57:40 GMT 2006


Author: metze
Date: 2006-01-21 07:57:39 +0000 (Sat, 21 Jan 2006)
New Revision: 13059

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13059

Log:
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
Modified:
   branches/SAMBA_4_0/source/wrepl_server/wrepl_apply_records.c


Changeset:
Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_apply_records.c
===================================================================
--- branches/SAMBA_4_0/source/wrepl_server/wrepl_apply_records.c	2006-01-20 20:22:23 UTC (rev 13058)
+++ branches/SAMBA_4_0/source/wrepl_server/wrepl_apply_records.c	2006-01-21 07:57:39 UTC (rev 13059)
@@ -415,8 +415,8 @@
 	}
 
 	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 @@
 		}
 	}
 
-	/* NOT REPLACE */
-	return R_NOT_REPLACE;
+	/* NOT REPLACE, but PROPAGATE */
+	return R_DO_PROPAGATE;
 }
 
 /*
@@ -551,15 +551,18 @@
 	}
 
 	if (!R_IS_SGROUP(r2) || !R_IS_ACTIVE(r2)) {
-		/* NOT REPLACE */
+		/* NOT REPLACE, but PROPAGATE */
+		return R_DO_PROPAGATE;
+	}
+
+	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;
 	}
 
-	/*
-	 * TODO: should we have the same logic here like in 
-	 *       replace_sgroup_replica_vs_X_replica() ?
-	 */
-
 	/* not handled here: MERGE */
 	return R_DO_SGROUP_MERGE;
 }
@@ -624,8 +627,8 @@
 	}
 
 	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 @@
 			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 @@
 		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);
 	}
 



More information about the samba-cvs mailing list