From 16e92424cc3b8c2c47a71774728bc03ad5ef6855 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: May 09 2012 19:29:51 +0000 Subject: 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. --- diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c index 2819511..eac76a8 100644 --- a/ldap/servers/plugins/replication/cl5_api.c +++ b/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); } } diff --git a/ldap/servers/plugins/replication/repl_extop.c b/ldap/servers/plugins/replication/repl_extop.c index 31a9ad0..e4abde0 100644 --- a/ldap/servers/plugins/replication/repl_extop.c +++ b/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);