Fix for 4272 : Changes not replayed initially on adde
This issue happens when a new OpenDS server is added to a topology which has been up and
running for some time and the new server is both a Replication Server and a Directory Server.
In such cases the Replication Server starts empty and is therefore very late with regards to
the other servers.
The Directory Server is initialized from an up to date DS already in the topology and is therefore
not late.
The problem is that the new DS incorrectly choose the RS that was just installed to be provided
with all the new changes in the topology.
The DS therefore as to wait for the RS to grab all the old changes before being provided with the
new change.
The fix is to change the algorithm that is used by the DS to select the RS and to give priority
to the RS that are more up to date.
Gary would like to see this in the 2.2 branch and would therefore have to be back-ported there.
I have also added unit tests for this case and other similar ones.
replica DS after init