From 6aee0b088e10e3b5a525cff854faf471d99d1471 Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Tue, 10 Mar 2009 16:58:06 +0000
Subject: [PATCH] Fix for 3764 : Changing the replication configuration during a total update hangs
---
opends/src/messages/messages/replication.properties | 2 ++
opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java | 9 ++++++++-
opends/src/server/org/opends/server/replication/service/ReplicationDomain.java | 4 ++--
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/opends/src/messages/messages/replication.properties b/opends/src/messages/messages/replication.properties
index 3ead62c..2857292 100644
--- a/opends/src/messages/messages/replication.properties
+++ b/opends/src/messages/messages/replication.properties
@@ -360,3 +360,5 @@
for domain %s. Message: %s
SEVERE_ERR_RESET_GENERATION_ID_FAILED_152=The generation ID could not be \
reset for domain %s
+NOTICE_ERR_CANNOT_CHANGE_CONFIG_DURING_TOTAL_UPDATE_153=Cannot change the \
+ configuration while a total update is in progress
diff --git a/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java b/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
index 6c65c33..0abde4a 100644
--- a/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
+++ b/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -2738,7 +2738,14 @@
public boolean isConfigurationChangeAcceptable(
ReplicationDomainCfg configuration, List<Message> unacceptableReasons)
{
- return true;
+ if (this.importInProgress() || this.exportInProgress())
+ {
+ unacceptableReasons.add(
+ NOTE_ERR_CANNOT_CHANGE_CONFIG_DURING_TOTAL_UPDATE.get());
+ return false;
+ }
+ else
+ return true;
}
/**
diff --git a/opends/src/server/org/opends/server/replication/service/ReplicationDomain.java b/opends/src/server/org/opends/server/replication/service/ReplicationDomain.java
index 8c67c5d..883ae97 100644
--- a/opends/src/server/org/opends/server/replication/service/ReplicationDomain.java
+++ b/opends/src/server/org/opends/server/replication/service/ReplicationDomain.java
@@ -2656,7 +2656,7 @@
* @return A boolean indicating if a total update import is currently
* in Progress.
*/
- boolean importInProgress()
+ public boolean importInProgress()
{
if (ieContext == null)
return false;
@@ -2671,7 +2671,7 @@
* @return A boolean indicating if a total update export is currently
* in Progress.
*/
- boolean exportInProgress()
+ public boolean exportInProgress()
{
if (ieContext == null)
return false;
--
Gitblit v1.10.0