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

Jean-Noel Rouvignac
11.20.2015 e4f80a3325b8ca06ad3823113b2e30054e471062
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, June 11, 2015 12:20 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, June 11, 2015 12:20 +0200
commite4f80a3325b8ca06ad3823113b2e30054e471062
tree 0d01c8573f7f0b9d749d917c4627261b389639ad tree | zip | gz
parent 330babe38dedf05a5acf79e4a4663df9fa2183ed view | diff
OPENDJ-2106 (CR-7228) Entry is not replicated on second instance in 2 RS topology

A bit of context:
This code is executed by the RS which sends changes to a connected DS.

Fixed the logic in MessageHandler.fillLateQueue() which seemed flawed and even dangerous (because the connected DSs collection changes dynamically with the topology, and DSs can change their preferred RS). This is inherited from the 2.6 code worked: it did not have a global view of the changelog and specifically opened cursors for the connected DSs.
Given a replication change, the only DS we do not want to send it to is the originating DS itself.


MessageHandler.java:
In getNextMessage(), replaced the parameter Set<Integer> connectedReplicaIds with int sendToServerId and removed synchronous parameter (useless).

ServerHandler.java:
In take(), removed "Set<Integer> connectedReplicaIds" parameter.
Extracted methods acquirePermitInSendWindow() and incrementAssuredStats().
Inlined incrementAssuredSdSentUpdates() and incrementAssuredSrSentUpdates().

ReplicationServerDomain.java, ServerWriter.java:
Inlined ReplicationServerDomain.take().
4 files modified
115 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/replication/server/MessageHandler.java 28 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationServerDomain.java 16 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerHandler.java 67 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerWriter.java 4 ●●●● diff | view | raw | blame | history