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

Jean-Noel Rouvignac
11.20.2015 7ed8164f91194d46c58290cb0887fcfa7d585da7
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
commit7ed8164f91194d46c58290cb0887fcfa7d585da7
tree 89077ef5c4dbc605cdcd470256ae8b3eeb205d00 tree | zip | gz
parent 598e5c603d719b78c53d2783541f621caba20ed9 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-sdk/opendj-server-legacy/src/main/java/org/opends/server/replication/server/MessageHandler.java 28 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationServerDomain.java 16 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerHandler.java 67 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerWriter.java 4 ●●●● diff | view | raw | blame | history