fix for 3804 : improve replication monitoring
These changes improve the replication monitoring by
- changing the monitoring tree so that the monitoring entries use the
same topology as the current replication topology :
For example :
if the topology is currently 2 DS connected to 1 RS and 1RS
without any DS connected, the monitoring tree will consist
in a RS entry with 2 DS child entries and 1 RS child entry.
- rename the base-dn attribute into domain-name
- fix the DN of the monitoring entries so that comma and equals signs
are not used anymore in the RDN.
- group all the replication monitoring entries below cn=replication
and all the DS and RS entries below a suffix entry
| | |
| | | if (cacheFilter.searchMonitoringInformation()) |
| | | { |
| | | ctls = new SearchControls(); |
| | | ctls.setSearchScope(SearchControls.ONELEVEL_SCOPE); |
| | | ctls.setSearchScope(SearchControls.SUBTREE_SCOPE); |
| | | ctls.setReturningAttributes( |
| | | new String[] { |
| | | "approx-older-change-not-synchronized-millis", "missing-changes", |
| | | "base-dn", "server-id" |
| | | "domain-name", "server-id" |
| | | }); |
| | | filter = "(missing-changes=*)"; |
| | | |
| | |
| | | { |
| | | SearchResult sr = (SearchResult)monitorEntries.next(); |
| | | |
| | | String dn = getFirstValue(sr, "base-dn"); |
| | | String dn = getFirstValue(sr, "domain-name"); |
| | | int replicaId = -1; |
| | | try |
| | | { |
| | |
| | | @Override |
| | | public String getMonitorInstanceName() |
| | | { |
| | | return "ReplicationServer database " + baseDn.toString() + |
| | | " " + String.valueOf(serverId); |
| | | ReplicationServerDomain domain = |
| | | replicationServer.getReplicationServerDomain(baseDn, false); |
| | | |
| | | return "ReplicationServer database " + String.valueOf(serverId) + |
| | | ",cn=" + domain.getMonitorInstanceName(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.replication.server; |
| | | |
| | |
| | | public String getMonitorInstanceName() |
| | | { |
| | | String serverURL=""; // FIXME |
| | | String str = rsDomain.getBaseDn().toString() + " " + serverURL + " " |
| | | + String.valueOf(serverId); |
| | | return "Undirect LDAP Server " + str; |
| | | String str = serverURL + " " + String.valueOf(serverId); |
| | | return "Undirect Replica " + str + |
| | | ",cn=" + replServerHandler.getMonitorInstanceName(); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | attributes.add(Attributes.create("server-id", |
| | | String.valueOf(serverId))); |
| | | attributes.add(Attributes.create("base-dn", |
| | | attributes.add(Attributes.create("domain-name", |
| | | rsDomain.getBaseDn())); |
| | | attributes.add(Attributes.create("connected-to", |
| | | replServerHandler.getMonitorInstanceName())); |
| | |
| | | MonitorData md; |
| | | try |
| | | { |
| | | md = rsDomain.getMonitorData(); |
| | | md = rsDomain.computeMonitorData(); |
| | | |
| | | ServerState remoteState = md.getLDAPServerState(serverId); |
| | | if (remoteState == null) |
| | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.admin.std.server.MonitorProviderCfg; |
| | | import org.opends.server.admin.std.server.ReplicationServerCfg; |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.api.BackupTaskListener; |
| | | import org.opends.server.api.ExportTaskListener; |
| | | import org.opends.server.api.ImportTaskListener; |
| | | import org.opends.server.api.MonitorProvider; |
| | | import org.opends.server.api.RestoreTaskListener; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.replication.protocol.ProtocolSession; |
| | | import org.opends.server.replication.protocol.ReplSessionSecurity; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeBuilder; |
| | | import org.opends.server.types.Attributes; |
| | | import org.opends.server.types.BackupConfig; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | |
| | | * It is responsible for creating the replication server replicationServerDomain |
| | | * and managing it |
| | | */ |
| | | public class ReplicationServer extends MonitorProvider<MonitorProviderCfg> |
| | | implements Runnable, ConfigurationChangeListener<ReplicationServerCfg>, |
| | | public class ReplicationServer |
| | | implements ConfigurationChangeListener<ReplicationServerCfg>, |
| | | BackupTaskListener, RestoreTaskListener, ImportTaskListener, |
| | | ExportTaskListener |
| | | { |
| | |
| | | public ReplicationServer(ReplicationServerCfg configuration) |
| | | throws ConfigException |
| | | { |
| | | super("Replication Server" + configuration.getReplicationPort()); |
| | | |
| | | replicationPort = configuration.getReplicationPort(); |
| | | serverId = (short) configuration.getReplicationServerId(); |
| | | replicationServers = configuration.getReplicationServer(); |
| | |
| | | replSessionSecurity = new ReplSessionSecurity(); |
| | | initialize(replicationPort); |
| | | configuration.addChangeListener(this); |
| | | DirectoryServer.registerMonitorProvider(this); |
| | | |
| | | try |
| | | { |
| | | backendConfigEntryDN = DN.decode( |
| | |
| | | { |
| | | dbEnv.shutdown(); |
| | | } |
| | | DirectoryServer.deregisterMonitorProvider(getMonitorInstanceName()); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void initializeMonitorProvider(MonitorProviderCfg configuraiton) |
| | | { |
| | | // Nothing to do for now |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String getMonitorInstanceName() |
| | | { |
| | | return "Replication Server " + this.replicationPort + " " |
| | | + serverId; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public long getUpdateInterval() |
| | | { |
| | | /* we don't wont to do polling on this monitor */ |
| | | return 0; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void updateMonitorData() |
| | | { |
| | | // As long as getUpdateInterval() returns 0, this will never get called |
| | | |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public ArrayList<Attribute> getMonitorData() |
| | | { |
| | | /* |
| | | * publish the server id and the port number. |
| | | */ |
| | | ArrayList<Attribute> attributes = new ArrayList<Attribute>(); |
| | | attributes.add(Attributes.create("replication server id", |
| | | String.valueOf(serverId))); |
| | | attributes.add(Attributes.create("replication server port", |
| | | String.valueOf(replicationPort))); |
| | | |
| | | /* |
| | | * Add all the base DNs that are known by this replication server. |
| | | */ |
| | | AttributeBuilder builder = new AttributeBuilder("base-dn"); |
| | | for (String base : baseDNs.keySet()) |
| | | { |
| | | builder.add(base.toString()); |
| | | } |
| | | attributes.add(builder.toAttribute()); |
| | | |
| | | // Publish to monitor the generation ID by replicationServerDomain |
| | | builder = new AttributeBuilder("base-dn-generation-id"); |
| | | for (String base : baseDNs.keySet()) |
| | | { |
| | | long generationId=-1; |
| | | ReplicationServerDomain replicationServerDomain = |
| | | getReplicationServerDomain(base, false); |
| | | if (replicationServerDomain != null) |
| | | generationId = replicationServerDomain.getGenerationId(); |
| | | builder.add(base.toString() + " " + generationId); |
| | | } |
| | | attributes.add(builder.toAttribute()); |
| | | |
| | | return attributes; |
| | | } |
| | | |
| | | /** |
| | | * Get the value of generationId for the replication replicationServerDomain |
| | | * associated with the provided baseDN. |
| | | * |
| | |
| | | replicationServerDomain.stopReplicationServers(serversToDisconnect); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public String getMonitorInstanceName() |
| | | { |
| | | return "Replication Server " + replicationPort + " " + serverId; |
| | | } |
| | | |
| | | /** |
| | | * Retrieves the port used by this ReplicationServer. |
| | | * |
| | | * @return The port used by this ReplicationServer. |
| | | */ |
| | | public int getReplicationPort() |
| | | { |
| | | return replicationPort; |
| | | } |
| | | } |
| | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | import org.opends.server.admin.std.server.MonitorProviderCfg; |
| | | import org.opends.server.api.MonitorProvider; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.messages.ReplicationMessages.*; |
| | |
| | | import org.opends.server.replication.protocol.MonitorMsg; |
| | | import org.opends.server.replication.protocol.MonitorRequestMsg; |
| | | import org.opends.server.replication.protocol.ResetGenerationIdMsg; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeBuilder; |
| | | import org.opends.server.types.Attributes; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.TimeThread; |
| | |
| | | * received to the disk and for trimming them |
| | | * Decision to trim can be based on disk space or age of the message |
| | | */ |
| | | public class ReplicationServerDomain |
| | | public class ReplicationServerDomain extends MonitorProvider<MonitorProviderCfg> |
| | | { |
| | | private final Object flowControlLock = new Object(); |
| | | private final String baseDn; |
| | |
| | | public ReplicationServerDomain( |
| | | String baseDn, ReplicationServer replicationServer) |
| | | { |
| | | super("Replication Server " + replicationServer.getReplicationPort() + " " |
| | | + baseDn + " " + replicationServer.getServerId()); |
| | | |
| | | this.baseDn = baseDn; |
| | | this.replicationServer = replicationServer; |
| | | this.assuredTimeoutTimer = new Timer("Replication Assured Timer for " + |
| | | baseDn + " in RS " + replicationServer.getServerId(), true); |
| | | |
| | | DirectoryServer.registerMonitorProvider(this); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public void shutdown() |
| | | { |
| | | DirectoryServer.deregisterMonitorProvider(getMonitorInstanceName()); |
| | | |
| | | // Terminate the assured timer |
| | | assuredTimeoutTimer.cancel(); |
| | | |
| | |
| | | * @return The monitor data. |
| | | * @throws DirectoryException When an error occurs. |
| | | */ |
| | | synchronized protected MonitorData getMonitorData() |
| | | synchronized protected MonitorData computeMonitorData() |
| | | throws DirectoryException |
| | | { |
| | | if (monitorData.getBuildDate() + monitorDataLifeTime > TimeThread.getTime()) |
| | |
| | | statusAnalyzer.setDeradedStatusThreshold(degradedStatusThreshold); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void initializeMonitorProvider(MonitorProviderCfg configuraiton) |
| | | { |
| | | // Nothing to do for now |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String getMonitorInstanceName() |
| | | { |
| | | return "Replication Server " |
| | | + replicationServer.getReplicationPort() + " " |
| | | + " " + replicationServer.getServerId() |
| | | + ",cn=" + baseDn.replace(',', '_').replace('=', '_') |
| | | + ",cn=replication"; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public long getUpdateInterval() |
| | | { |
| | | /* we don't wont to do polling on this monitor */ |
| | | return 0; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void updateMonitorData() |
| | | { |
| | | // As long as getUpdateInterval() returns 0, this will never get called |
| | | |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public ArrayList<Attribute> getMonitorData() |
| | | { |
| | | /* |
| | | * publish the server id and the port number. |
| | | */ |
| | | ArrayList<Attribute> attributes = new ArrayList<Attribute>(); |
| | | attributes.add(Attributes.create("replication server id", |
| | | String.valueOf(replicationServer.getServerId()))); |
| | | attributes.add(Attributes.create("replication server port", |
| | | String.valueOf(replicationServer.getReplicationPort()))); |
| | | |
| | | /* |
| | | * Add all the base DNs that are known by this replication server. |
| | | */ |
| | | AttributeBuilder builder = new AttributeBuilder("domain-name"); |
| | | builder.add(baseDn); |
| | | attributes.add(builder.toAttribute()); |
| | | |
| | | // Publish to monitor the generation ID by replicationServerDomain |
| | | builder = new AttributeBuilder("generation-id"); |
| | | builder.add(baseDn.toString() + " " + generationId); |
| | | attributes.add(builder.toAttribute()); |
| | | |
| | | return attributes; |
| | | } |
| | | } |
| | | |
| | |
| | | @Override |
| | | public String getMonitorInstanceName() |
| | | { |
| | | String str = baseDn.toString() + |
| | | " " + serverURL + " " + String.valueOf(serverId); |
| | | String str = serverURL + " " + String.valueOf(serverId); |
| | | |
| | | if (serverIsLDAPserver) |
| | | return "Directory Server " + str; |
| | | return "Connected Replica " + str + |
| | | ",cn=" + replicationServerDomain.getMonitorInstanceName(); |
| | | else |
| | | return "Remote Replication Server " + str; |
| | | return "Connected Replication Server " + str + |
| | | ",cn=" + replicationServerDomain.getMonitorInstanceName(); |
| | | } |
| | | |
| | | /** |
| | |
| | | ArrayList<Attribute> attributes = new ArrayList<Attribute>(); |
| | | if (serverIsLDAPserver) |
| | | { |
| | | attributes.add(Attributes.create("LDAP-Server", serverURL)); |
| | | attributes.add(Attributes.create("replica", serverURL)); |
| | | attributes.add(Attributes.create("connected-to", |
| | | this.replicationServerDomain.getReplicationServer() |
| | | .getMonitorInstanceName())); |
| | |
| | | } |
| | | else |
| | | { |
| | | attributes.add(Attributes.create("ReplicationServer-Server", |
| | | attributes.add(Attributes.create("Replication-Server", |
| | | serverURL)); |
| | | } |
| | | attributes.add(Attributes.create("server-id", String |
| | | .valueOf(serverId))); |
| | | attributes.add(Attributes.create("base-dn", baseDn.toString())); |
| | | attributes.add(Attributes.create("domain-name", baseDn.toString())); |
| | | |
| | | try |
| | | { |
| | | MonitorData md; |
| | | md = replicationServerDomain.getMonitorData(); |
| | | md = replicationServerDomain.computeMonitorData(); |
| | | |
| | | if (serverIsLDAPserver) |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Gets the info for DSs in the topology (except us). |
| | | * @return The info for DSs in the topology (except us) |
| | | * Gets the info for Replicas in the topology (except us). |
| | | * @return The info for Replicas in the topology (except us) |
| | | */ |
| | | public List<DSInfo> getDsList() |
| | | public List<DSInfo> getReplicasList() |
| | | { |
| | | return broker.getDsList(); |
| | | } |
| | |
| | | @Override |
| | | public String getMonitorInstanceName() |
| | | { |
| | | return "Replication Domain " + domain.getServiceID() |
| | | + " " + domain.getServerId(); |
| | | return "Replication Domain " + domain.getServerId() |
| | | + ",cn=" + domain.getServiceID().replace(',', '_').replace('=', '_') |
| | | + ",cn=replication"; |
| | | } |
| | | |
| | | /** |
| | |
| | | ArrayList<Attribute> attributes = new ArrayList<Attribute>(); |
| | | |
| | | /* get the base dn */ |
| | | Attribute attr = Attributes.create("base-dn", domain.getServiceID()); |
| | | Attribute attr = Attributes.create("domain-name", domain.getServiceID()); |
| | | attributes.add(attr); |
| | | |
| | | /* get the base dn */ |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Copyright 2007-2009 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.replication; |
| | | |
| | |
| | | connection.processDelete(DN.decode("dc=fooUniqueName2," + EXAMPLE_DN)); |
| | | |
| | | String buildRoot = System.getProperty(TestCaseUtils.PROPERTY_BUILD_ROOT); |
| | | String path = buildRoot + File.separator + "build" + |
| | | File.separator + "unit-tests" + File.separator + |
| | | "package-instance"+ File.separator + "ReSynchTest"; |
| | | String path = "ReSynchTest"; |
| | | |
| | | task("dn: ds-task-id=" + UUID.randomUUID() |
| | | + ",cn=Scheduled Tasks,cn=Tasks\n" |
| | |
| | | protected long getMonitorAttrValue(DN baseDn, String attr) throws Exception |
| | | { |
| | | String monitorFilter = |
| | | "(&(cn=replication Domain*)(base-dn=" + baseDn + "))"; |
| | | "(&(cn=replication Domain*)(domain-name=" + baseDn + "))"; |
| | | |
| | | InternalSearchOperation op; |
| | | int count = 0; |
| | |
| | | * Find monitoring entry for requested base DN |
| | | */ |
| | | String monitorFilter = |
| | | "(&(cn=replication Domain*)(base-dn=" + baseDn + "))"; |
| | | "(&(cn=replication Domain*)(domain-name=" + baseDn + "))"; |
| | | |
| | | InternalSearchOperation op; |
| | | int count = 0; |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | /** |
| | | * Get the topo view of the current analyzed DS |
| | | */ |
| | | List<DSInfo> internalDsList = rd.getDsList(); |
| | | List<DSInfo> internalDsList = rd.getReplicasList(); |
| | | // Add info for DS itself: |
| | | // we need to clone the list as we don't want to modify the list kept |
| | | // inside the DS. |
| | |
| | | // RS receives updates but does not respond (makes timeouts) |
| | | private static final int TIMEOUT_RS_SCENARIO = 12; |
| | | // RS is used for sending updates (with sendNewFakeUpdate()) and receive acks, synchronously |
| | | private static final int SENDER_RS_SCENARIO = 13; |
| | | private static final int SENDER_RS_SCENARIO = 13; |
| | | // Scenarios only used in safe read tests: |
| | | // RS receives updates and replies ack error as if a DS was connected to it and timed out |
| | | private static final int DS_TIMEOUT_RS_SCENARIO_SAFE_READ = 14; |
| | |
| | | List<RSInfo> rsInfo = null; |
| | | while(nSec > 0) |
| | | { |
| | | dsInfo = fakeRd.getDsList(); |
| | | dsInfo = fakeRd.getReplicasList(); |
| | | rsInfo = fakeRd.getRsList(); |
| | | nDs = dsInfo.size(); |
| | | nRs = rsInfo.size(); |
| | |
| | | /* |
| | | * Start another fake DS 2 connected to RS |
| | | */ |
| | | |
| | | |
| | | fakeRd2 = createFakeReplicationDomain(FDS2_ID, DEFAULT_GID, RS1_ID, |
| | | DEFAULT_GENID, true, AssuredMode.SAFE_READ_MODE, 1, LONG_TIMEOUT, |
| | | REPLY_OK_DS_SCENARIO); |
| | | assertNotNull(fakeRd2); |
| | | |
| | | |
| | | /* |
| | | * Start another fake DS 3 connected to RS |
| | | */ |
| | | |
| | | |
| | | fakeRd3 = createFakeReplicationDomain(FDS3_ID, otherFakeDsGid, RS1_ID, |
| | | otherFakeDsGenId, ((otherFakeDsGid == DEFAULT_GID) ? true : false), |
| | | AssuredMode.SAFE_READ_MODE, 1, LONG_TIMEOUT, |
| | | otherFakeDsScen); |
| | | assertNotNull(fakeRd3); |
| | | |
| | | |
| | | /* |
| | | * Start fake RS (RS 1) connected to RS |
| | | */ |
| | | |
| | | |
| | | fakeRs1 = createFakeReplicationServer(FRS1_ID, DEFAULT_GID, RS1_ID, |
| | | DEFAULT_GENID, true, AssuredMode.SAFE_READ_MODE, 1, |
| | | new ServerState(), REPLY_OK_RS_SCENARIO); |
| | | assertNotNull(fakeRs1); |
| | | |
| | | |
| | | /* |
| | | * Start another fake RS (RS 2) connected to RS |
| | | */ |
| | | |
| | | |
| | | fakeRs2 = createFakeReplicationServer(FRS2_ID, otherFakeRsGid, RS1_ID, |
| | | otherFakeRsGenId, ((otherFakeRsGid == DEFAULT_GID) ? true : false), |
| | | AssuredMode.SAFE_READ_MODE, 1, new ServerState(), otherFakeRsScen); |
| | |
| | | if (shouldSeeDsRsIdInError) |
| | | expectedErrors.put(DS_FRS2_ID, 1); |
| | | checkServerErrorListsAreEqual(fakeRd1.getAssuredSrServerNotAcknowledgedUpdates(), expectedErrors); |
| | | |
| | | |
| | | assertEquals(fakeRd1.getAssuredSrReceivedUpdates(), 0); |
| | | assertEquals(fakeRd1.getAssuredSrReceivedUpdatesAcked(), 0); |
| | | assertEquals(fakeRd1.getAssuredSrReceivedUpdatesNotAcked(), 0); |
| | |
| | | // Wait for connections to be finished |
| | | // DS must see expected numbers of DSs/RSs |
| | | waitForStableTopo(fakeRd1, 1, 1); |
| | | List<DSInfo> dsInfos = fakeRd1.getDsList(); |
| | | List<DSInfo> dsInfos = fakeRd1.getReplicasList(); |
| | | DSInfo dsInfo = dsInfos.get(0); |
| | | assertEquals(dsInfo.getDsId(), FDS2_ID); |
| | | assertEquals(dsInfo.getStatus(), ServerStatus.NORMAL_STATUS); |
| | |
| | | boolean error = true; |
| | | for (int count = 0; count < 12; count++) |
| | | { |
| | | dsInfos = fakeRd1.getDsList(); |
| | | dsInfos = fakeRd1.getReplicasList(); |
| | | if (dsInfos == null) |
| | | continue; |
| | | if (dsInfos.size() == 0) |
| | |
| | | error = true; |
| | | for (int count = 0; count < 12; count++) |
| | | { |
| | | dsInfos = fakeRd1.getDsList(); |
| | | dsInfos = fakeRd1.getReplicasList(); |
| | | if (dsInfos == null) |
| | | continue; |
| | | if (dsInfos.size() == 0) |
| | |
| | | assertTrue(replServerInfo.getGenerationId() == 1); |
| | | } |
| | | |
| | | for (DSInfo serverInfo : domain1.getDsList()) |
| | | for (DSInfo serverInfo : domain1.getReplicasList()) |
| | | { |
| | | assertTrue(serverInfo.getStatus() == ServerStatus.NORMAL_STATUS); |
| | | } |
| | |
| | | assertTrue(replServerInfo.getGenerationId() == 2); |
| | | } |
| | | |
| | | for (DSInfo serverInfo : domain1.getDsList()) |
| | | for (DSInfo serverInfo : domain1.getReplicasList()) |
| | | { |
| | | if (serverInfo.getDsId() == 2) |
| | | assertTrue(serverInfo.getStatus() == ServerStatus.BAD_GEN_ID_STATUS); |
| | |
| | | } |
| | | } |
| | | |
| | | for (DSInfo serverInfo : domain2.getDsList()) |
| | | for (DSInfo serverInfo : domain2.getReplicasList()) |
| | | { |
| | | if (serverInfo.getDsId() == 2) |
| | | assertTrue(serverInfo.getStatus() == ServerStatus.BAD_GEN_ID_STATUS); |
| | |
| | | * Trigger a total update from domain1 to domain2. |
| | | * Check that the exported data is correctly received on domain2. |
| | | */ |
| | | for (DSInfo remoteDS : domain2.getDsList()) |
| | | for (DSInfo remoteDS : domain2.getReplicasList()) |
| | | { |
| | | if (remoteDS.getDsId() != domain2.getServerId()) |
| | | { |
| | |
| | | boolean alone = true; |
| | | while (alone) |
| | | { |
| | | for (DSInfo remoteDS : domain1.getDsList()) |
| | | for (DSInfo remoteDS : domain1.getReplicasList()) |
| | | { |
| | | if (remoteDS.getDsId() != domain1.getServerId()) |
| | | { |