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

Jean-Noel Rouvignac
11.54.2014 aea0892feca2fd3d56c9c810debed6d22389454e
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Friday, July 11, 2014 11:54 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Friday, July 11, 2014 11:54 +0200
commitaea0892feca2fd3d56c9c810debed6d22389454e
tree 9d2597e827e78661c50954f13b094c59bb227a3c tree | zip | gz
parent 0642bd56015b5571ada7bb38b77844c08b574d4c 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
465 ■■■■■ changed files
opendj3-server-dev/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java 8 ●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/plugin/MultimasterReplication.java 125 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/plugin/RemotePendingChanges.java 5 ●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/plugin/ReplicationServerListener.java 65 ●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/protocol/ReplicaOfflineMsg.java 7 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/protocol/UpdateMsg.java 10 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/ECLServerWriter.java 36 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/MessageHandler.java 30 ●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationServer.java 37 ●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/ServerHandler.java 28 ●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/ServerWriter.java 20 ●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/service/DSRSShutdownSync.java 85 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/service/ReplicationDomain.java 9 ●●●●● diff | view | raw | blame | history