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

Jean-Noel Rouvignac
11.54.2014 80054b8dde903071ee455c05f08e9cc0c02a56f4
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
commit80054b8dde903071ee455c05f08e9cc0c02a56f4
tree 2f64be8191e1645d7562601c96a6479c3a7ef046 tree | zip | gz
parent a7d3c60c36a76a1949269775daef94f0429bcfdd 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().
12 files modified
1 files added
465 ■■■■■ changed files
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java 8 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/plugin/MultimasterReplication.java 125 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/plugin/RemotePendingChanges.java 5 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/plugin/ReplicationServerListener.java 65 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/protocol/ReplicaOfflineMsg.java 7 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/protocol/UpdateMsg.java 10 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/server/ECLServerWriter.java 36 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/server/MessageHandler.java 30 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationServer.java 37 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/server/ServerHandler.java 28 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/server/ServerWriter.java 20 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/service/DSRSShutdownSync.java 85 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/service/ReplicationDomain.java 9 ●●●●● diff | view | raw | blame | history