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

mrossign
03.44.2009 4b1c40ffa0ccf7d8d589d85ea62093f43ce0a9db
Fix for 2965: missing-change does not exist in cn=monitor for replication server

4 files modified
33 ■■■■ changed files
opends/src/messages/messages/replication.properties 3 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java 18 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ServerHandler.java 8 ●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/ReplicationDomainTest.java 4 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/replication.properties
@@ -363,4 +363,5 @@
NOTICE_ERR_CANNOT_CHANGE_CONFIG_DURING_TOTAL_UPDATE_153=Cannot change the \
 configuration while a total update is in progress
SEVERE_ERR_COULD_NOT_START_REPLICATION_154=The Replication was not started \
 on base-dn %s : %s
 on base-dn %s : %s
MILD_ERR_ERROR_RETRIEVING_MONITOR_DATA_155=Error retrieving monitoring data: %s
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
@@ -2746,6 +2746,24 @@
    builder.add(baseDn.toString() + " " + generationId);
    attributes.add(builder.toAttribute());
    try
    {
      MonitorData md = computeMonitorData();
      // Missing changes
      long missingChanges =
        md.getMissingChangesRS(replicationServer.getServerId());
      attributes.add(Attributes.create("missing-changes", String.valueOf(
        missingChanges)));
    }
    catch (Exception e)
    {
      Message message =
        ERR_ERROR_RETRIEVING_MONITOR_DATA.get(stackTraceToSingleLineString(e));
      // We failed retrieving the monitor data.
      attributes.add(Attributes.create("error", message.toString()));
    }
    return attributes;
  }
}
opends/src/server/org/opends/server/replication/server/ServerHandler.java
@@ -2075,10 +2075,10 @@
    }
    catch (Exception e)
    {
      // TODO: improve the log
      // We failed retrieving the remote monitor data.
      attributes.add(Attributes.create("error",
          stackTraceToSingleLineString(e)));
      Message message =
        ERR_ERROR_RETRIEVING_MONITOR_DATA.get(stackTraceToSingleLineString(e));
      // We failed retrieving the monitor data.
      attributes.add(Attributes.create("error", message.toString()));
    }
    attributes.add(
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/ReplicationDomainTest.java
@@ -105,11 +105,11 @@
      BlockingQueue<UpdateMsg> rcvQueue1 = new LinkedBlockingQueue<UpdateMsg>();
      domain1 = new FakeReplicationDomain(
          testService, (short) domain1ServerId, servers, 100, 1000, rcvQueue1);
          testService, domain1ServerId, servers, 100, 1000, rcvQueue1);
      BlockingQueue<UpdateMsg> rcvQueue2 = new LinkedBlockingQueue<UpdateMsg>();
      domain2 = new FakeReplicationDomain(
          testService, (short) domain2ServerId, servers, 100, 1000, rcvQueue2);
          testService, domain2ServerId, servers, 100, 1000, rcvQueue2);
      /*
       * Publish a message from domain1,