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

Jean-Noel Rouvignac
04.06.2013 90856376b31a5d0071a17b86c2f0c92950873612
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
commit90856376b31a5d0071a17b86c2f0c92950873612
tree b46a5e6b8e0f5610ed15b9d794e94e3dbda2f572 tree | zip | gz
parent 1c68c17e1e8d4c802028e0d7b4de47f6d3a0b93d 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
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java 85 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingTest.java 34 ●●●●● diff | view | raw | blame | history