浏览代码

Issue 5098 - Multiple issues around replication and CI test test_online_reinit_may_hang (#5109)

progier389 3 年之前
父节点
当前提交
a11f9679dc
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. 4 5
      ldap/servers/plugins/replication/repl5_replica.c

+ 4 - 5
ldap/servers/plugins/replication/repl5_replica.c

@@ -1656,11 +1656,10 @@ int replica_check_for_data_reload (Replica *r, void *arg)
             return -1;
             return -1;
         }
         }
 
 
-        if (upper_bound_ruv)
-        {
-            ruv_obj = replica_get_ruv (r);
-            r_ruv = object_get_data (ruv_obj);
-            PR_ASSERT (r_ruv);
+        if (upper_bound_ruv && ruv_replica_count(upper_bound_ruv) > 0) {
+            ruv_obj = replica_get_ruv(r);
+            r_ruv = object_get_data(ruv_obj);
+            PR_ASSERT(r_ruv);
 
 
             /* Compare new ruv to the changelog's upper bound ruv. We could only keep
             /* Compare new ruv to the changelog's upper bound ruv. We could only keep
                the existing changelog if its upper bound is the same as replica's RUV.
                the existing changelog if its upper bound is the same as replica's RUV.