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

Jean-Noel Rouvignac
20.58.2013 f83d3ded8fef86f979d40949b9470e41ed2a6ad9
Fixed a NullPointerException in ReplicationServerDomain.getEligibleCSN().
Ensured ReplicationDomainDB.getDomainLastAliveCSNs() never returns null.
2 files modified
14 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java 4 ●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java 10 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java
@@ -76,9 +76,7 @@
   *
   * @param baseDN
   *          the replication domain baseDN
   * @return a new ServerState object holding the {serverId => CSN} Map. Can be
   *         null if the config that computes change numbers is set to false or
   *         if domain is not replicated.
   * @return a non null new ServerState object holding the {serverId => CSN} Map
   */
  ServerState getDomainLastAliveCSNs(DN baseDN);
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java
@@ -540,7 +540,7 @@
        return results.duplicate();
      }
    }
    return null;
    return new ServerState();
  }
  /** {@inheritDoc} */
@@ -808,9 +808,11 @@
  @Override
  public void replicaOffline(DN baseDN, CSN offlineCSN)
  {
    // TODO implement this when the changelogDB will be responsible for
    // maintaining the medium consistency point
    // TODO make sure that this operation will not lose changes
    final ChangeNumberIndexer indexer = cnIndexer.get();
    if (indexer != null)
    {
      indexer.replicaOffline(baseDN, offlineCSN);
    }
    // TODO save this state in the changelogStateDB?
  }
}