소스 검색

Resolves: #216512
Summary: replica initialization: random failure (Comment #1)
Change: if acquire_replica is called for replica initialization, log REPLICA_BUSY.

Noriko Hosoi 19 년 전
부모
커밋
defcb5dea5
1개의 변경된 파일19개의 추가작업 그리고 5개의 파일을 삭제
  1. 19 5
      ldap/servers/plugins/replication/repl5_protocol_util.c

+ 19 - 5
ldap/servers/plugins/replication/repl5_protocol_util.c

@@ -310,11 +310,25 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV **ruv)
 								break;
 							case NSDS50_REPL_REPLICA_BUSY:
 								/* Someone else is updating the replica. Try later. */
-								slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
-									"%s: Unable to acquire replica: "
-									"the replica is currently being updated"
-									"by another supplier. Will try later\n",
-									agmt_get_long_name(prp->agmt));
+								/* if acquire_replica is called for replica 
+								   initialization, log REPLICA_BUSY, too */
+								if (strcmp(REPL_NSDS50_TOTAL_PROTOCOL_OID,
+										   prot_oid) == 0)
+								{
+									slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+										"%s: Unable to acquire replica: "
+										"the replica is currently being updated"
+										"by another supplier.\n",
+										agmt_get_long_name(prp->agmt));
+								}
+								else /* REPL_NSDS50_INCREMENTAL_PROTOCOL_OID */
+								{
+									slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+										"%s: Unable to acquire replica: "
+										"the replica is currently being updated"
+										"by another supplier. Will try later\n",
+										agmt_get_long_name(prp->agmt));
+								}
 								return_value = ACQUIRE_REPLICA_BUSY;
 								break;
 							case NSDS50_REPL_LEGACY_CONSUMER: