瀏覽代碼

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.
Noriko Hosoi 14 年之前
父節點
當前提交
c21b037b4d
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      ldap/servers/plugins/replication/repl5_replica.c

+ 3 - 1
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