Browse Source

Ticket #337 - Improve CLEANRUV task

Bug Description:  After restarting a replica, regardless if it was cleaned, would trigger
                  ruv_compare_ruv errors at startup.

Fix Description:  There were simple typos in the fix when checking if the rid was already cleaned.
Mark Reynolds 13 years ago
parent
commit
da3f9226ca

+ 3 - 3
ldap/servers/plugins/replication/cl5_api.c

@@ -3899,7 +3899,7 @@ static int _cl5UpdateRUV (Object *obj, CSN *csn, PRBool newReplica, PRBool purge
     {
         if (ruv_contains_replica (file->purgeRUV, rid))
             return CL5_SUCCESS;
-        else if(is_cleaned_rid(rid))
+        else if(!is_cleaned_rid(rid))
         {
             /* if the replica is not part of the purgeRUV yet, add it unless it's from a cleaned rid */
             ruv_add_replica (file->purgeRUV, rid, multimaster_get_local_purl());
@@ -3909,8 +3909,8 @@ static int _cl5UpdateRUV (Object *obj, CSN *csn, PRBool newReplica, PRBool purge
     {
         if (purge)
             rc = ruv_set_csns(file->purgeRUV, csn, NULL);
-        else if(is_cleaned_rid(rid)){
-            /* don't update maxRuv is if rid is cleaned */
+        else if(!is_cleaned_rid(rid)){
+            /* don't update maxRuv if rid is cleaned */
             rc = ruv_set_csns(file->maxRUV, csn, NULL);
         }
     }

+ 1 - 1
ldap/servers/plugins/replication/repl_extop.c

@@ -1546,7 +1546,7 @@ multimaster_extop_releaseruv(Slapi_PBlock *pb){
 	char *iter;
 	int send_msgid = 0;
 	int rid = 0;
-	int rc = -1;
+	int rc = 0;
 
 	slapi_pblock_get(pb, SLAPI_EXT_OP_REQ_OID, &extop_oid);
 	slapi_pblock_get(pb, SLAPI_EXT_OP_REQ_VALUE, &extop_value);