mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

gbellato
10.58.2009 6aee0b088e10e3b5a525cff854faf471d99d1471
Fix for 3764 : Changing the replication configuration during a total update hangs

This fix prevents the hang from happening by rejecting replication configuration changes
whenever a total update is in progress
3 files modified
15 ■■■■ changed files
opends/src/messages/messages/replication.properties 2 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java 9 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ReplicationDomain.java 4 ●●●● patch | view | raw | blame | history
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
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;
  }
  /**
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;