ldap/servers/plugins/replication/repl5_replica.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 429574fbc36b08f0073a79907f5d1fc6bd5b516b
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Fri Mar 25 16:18:34 2011 -0700
Bug 690955 - Mrclone fails due to the replica generation id mismatch
https://bugzilla.redhat.com/show_bug.cgi?id=690955
Description: To fix Bug 624442 - MMR: duplicate replica ID,
_replica_configure_ruv (repl5_replica.c) checks the replica IDs
from changelog, backend, and configuration. If the id from
config is different, recreate RUV.
For the mrclone (restore per backend instance) case, replica ID
from the backend is the other master's one. The value should
not be used to check if the RUV is recreated or not. Instead,
it does between the nsds5replicaID from config and the one
from the changelog.
diff --git a/ldap/servers/plugins/replication/repl5_replica.c
b/ldap/servers/plugins/replication/repl5_replica.c
index 71923d7..b2ebf93 100644
--- a/ldap/servers/plugins/replication/repl5_replica.c
+++ b/ldap/servers/plugins/replication/repl5_replica.c
@@ -1988,13 +1988,15 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
char *first_purl = NULL;
ruv_get_first_id_and_purl(ruv, &first_rid, &first_purl);
/* if the local supplier is not first in the list . . . */
+ /* rid is from changelog; first_rid is from backend */
if (rid != first_rid)
{
/* . . . move the local supplier to the beginning of the list */
ruv_move_local_supplier_to_first(ruv, rid);
need_update = RUV_UPDATE_PARTIAL; /* must update tombstone also */
}
- if (r->repl_rid != first_rid)
+ /* r->repl_rid is from config; rid is from changelog */
+ if (r->repl_rid != rid)
{
/* Most likely, the replica was once deleted
* and recreated with a different rid from the