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

Jean-Noel Rouvignac
03.19.2014 f948474a8031c24160da4b31f0b97354456b40ad
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, July 3, 2014 17:19 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, July 3, 2014 17:19 +0200
commitf948474a8031c24160da4b31f0b97354456b40ad
tree f139712e6e05f8250e1ae5d8e711472dd4a45e65 tree | zip | gz
parent 46b130dfb0d0602f64dfb3f6d6bfc926f926a615 view | diff
OPENDJ-1453 (CR-3938) Replica offline messages should be synced with updates

This changed managed to solve the combined DS/RS case. Mostly, because robot test is sometimes failing yet.
This is fixed by introducing a DSRSShutdownSync class which ensures that when the DS sends a ReplicaOfflineMsg, the RS will relay it to the rest of the topology.
Second main change is to ensure ReplicaOfflineMsgs do not update the domain's ServerState otherwise the functional tests detect an inconsistency in the backend ds-sync-state data between the 2 replica: the one that is stopped and the one that is never stopped. For this I added UpdateMsg.contributesToDomainState() and used it throughout.
The rest of the change is passing the DSRSShutdownSync down method calls.



DSRSShutdownSync.java: ADDED

UpdateMsg.java, ReplicaOfflineMsg.java:
Added contributesToDomainState()



MultimasterReplication.java:
Added dsrsShutdownSync field + created it here + passed it down creation of LDAPReplicationDomain and ReplicationServerListener.
Code cleanup.

LDAPReplicationDomain.java:
Added dsrsShutdownSync field + used it in publishReplicaOfflineMsg().

ReplicationServerListener.java
Added dsrsShutdownSync field + used it when creating ReplicationServer.
Code cleanup.

ReplicationServer.java:
Added dsrsShutdownSync field + added getDSRSShutdownSync() getter.

ServerHandler.java
Called ReplicationServer.getDSRSShutdownSync() when creating ServerWriter.
Code cleanup.

ServerWriter.java:
Added dsrsShutdownSync field + used it in run().



ECLServerWriter.java:
Consequence of the change to ServerWriter.
Code cleanup.



RemotePendingChanges.java, ReplicationDomain.java, MessageHandler.java:
Used UpdateMsg.contributesToDomainState().
1 files added
12 files modified
492 ■■■■■ changed files
opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java 8 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java 125 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/RemotePendingChanges.java 5 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/ReplicationServerListener.java 63 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/protocol/ReplicaOfflineMsg.java 7 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/protocol/UpdateMsg.java 10 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ECLServerWriter.java 36 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/MessageHandler.java 30 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServer.java 66 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ServerHandler.java 28 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ServerWriter.java 20 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/DSRSShutdownSync.java 85 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ReplicationDomain.java 9 ●●●●● diff | view | raw | blame | history