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

Jean-Noel Rouvignac
06.12.2014 2cf4412179a4ca8610d7fbb2108040377290bf82
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Friday, June 6, 2014 15:12 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Friday, June 6, 2014 15:12 +0200
commit2cf4412179a4ca8610d7fbb2108040377290bf82
tree 52962e8f9cc864e1707cf76855d6810f0fddd3a1 tree | zip | gz
parent 1c983c4aa573702c541afe052654cc5147f69182 view | diff
OPENDJ-1453 (CR-3697) Change time heart beat change numbers should be synced with updates

Left over changes from a failed attempt at sending replica offline messages after all update messages have been sent on replica shutdown (see the JIRA issue for details):
- Shutdown sequence improvements (reordered shutdown stages)
- Code cleanups / refactorings / clarifications



DirectoryServer.java:
In shutDown(), removed dead code + reordered stages to: shutdown connection handlers, then work queue, then replication, then the rest.
shutting down the work queue waits for the worker threads to exit for ServerShutdownMonitor.WAIT_TIME. To be improved by OPENDJ-1469 2 phase shutdown
Made several constants final.
Made several methods private.

ServerShutdownMonitor.java:
Extracted WAIT_TIME constants to reuse it in DirectoryServer.shutDown().

ReplicationBroker.java
Reordered shutdown sequence: first shutdown changeTime heartbeat publisher thread, then RS heartbeat monitoring thread, then set no connected RS.


ReplicationDomain.java, DummyReplicationDomain.java:
Made status private + added signalNewStatus().

LDAPReplicationDomain.java:
Consequence of the change to signalNewStatus().

ReplicationServerDomain.java:
Added PendingStatusMessages.toString().
Made some methods private.
In sendPendingTopologyMsgs(), avoid building a topology message if there is no RSs to send it to.


PendingChange.java:
Code cleanup.
Removed useless field/methods targetDN, getTargetDN(), setOp().
Added toString().

PendingChanges.java:
In putLocalOperation(), avoid storing synchronization operations because they will never be sent (see code in pushCommittedChanges()).
In pushCommittedChanges(), made better use of TreeMap API + do not return int anymore (it was never used).
In commitAndPushCommittedChanges(), do not return int anymore (it was never used).

RemotePendingChanges.java:
Consequence of the change to PendingChange.getTargetDN().
Renamed targetDn local variables to targetDN.


TraditionalWorkerThread.java, CSNGenerator.java:
Code cleanup.
12 files modified
421 ■■■■ changed files
opends/src/server/org/opends/server/core/DirectoryServer.java 104 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/core/ServerShutdownMonitor.java 15 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/extensions/TraditionalWorkerThread.java 16 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/common/CSNGenerator.java 16 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java 7 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/PendingChange.java 58 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/PendingChanges.java 59 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/RemotePendingChanges.java 93 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java 35 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ReplicationBroker.java 4 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ReplicationDomain.java 12 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/DummyReplicationDomain.java 2 ●●● diff | view | raw | blame | history