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

Jean-Noel Rouvignac
04.06.2013 3253906b33605684c3e071a6e5c3af0f20c9e375
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, November 4, 2013 12:06 +0100
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, November 4, 2013 12:06 +0100
commit3253906b33605684c3e071a6e5c3af0f20c9e375
tree cc593ed50de5c84b5eeebbcd2ecde5c6f535d202 tree | zip | gz
parent b3d84c5ce8aa6a3fe827799d62ddf5be00e00d35 view | diff
OPENDJ-1190 (CR-2523) Under rare circumstances the DS replication recovery thread (RSUpdater) can spin


This change is linked to the misbehaving RSUpdater thread which (wrongly):
- could be started multiple times
- would not shutdown willingly when the server is shutting down
- would try to look for replay operations in the future



LDAPReplicationDomain.java:
Added AtomicReference for RSUpdater thread.
Used DirectoryThread.isShutdownInitiated() for ServerStateFlush and RSUpdater threads.
In RSUpdater, added shutdown field to pass it down to buildAndPublishMissingChanges() + overrode initiateShutdown() to set the shutdown field to true.
In shutdown(), called initiateShutdown() for RSUpdater and RSUpdater threads.
In sessionInitiated(), only start the RSUpdaterThread if it does not already exist.
In buildAndPublishMissingChanges(), added early exits in case of shutdown.
Added now() method.

HistoricalCsnOrderingTest.java:
Consequence of the change to LDAPReplicationDomain.
2 files modified
119 ■■■■■ changed files
opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java 85 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingTest.java 34 ●●●●● diff | view | raw | blame | history