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

Jean-Noel Rouvignac
24.20.2013 856fdd0571358c660afaf379f8e774ab8b24f05c
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, June 24, 2013 17:20 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, June 24, 2013 17:20 +0200
commit856fdd0571358c660afaf379f8e774ab8b24f05c
tree f59b30762c03206457f6346b5cf810b501963562 tree | zip | gz
parent af76a3750288d90c006022829887c92601a4737c view | diff
OPENDJ-885 (CR-1909) Replication replay may lose changes if it can't acquire a writeLock 


The code replaying the replicated operations now handles BUSY and UNAVAILABLE result codes and will retry replaying these operations.
Prevented a possible OutOfMemoryError by bounding the queue holding the replicated operations.


LDAPReplicationDomain.java, ReplicationDomain.java:
In replay(), added the AtomicBoolean shutdown parameter + tested for server shutdown + handled BUSY and UNAVAILABLE result codes +
In processUpdate(), added the AtomicBoolean shutdown parameter + tested for server shutdown + ensured the code works with a bounded queue.
Extracted logDecodingOperationError() out of replay().

MultimasterReplication.java:
Made updateToReplayQueue a bounded queue (it was unbounded before).

ReplayThread.java, ListenerThread.java:
Converted shutdown boolean instance member into an AtomicBoolean.
9 files modified
680 ■■■■ changed files
opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java 194 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java 87 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/ReplayThread.java 27 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ListenerThread.java 28 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ReplicationDomain.java 85 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/FractionalReplicationTest.java 116 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/NamingConflictTest.java 57 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/FakeReplicationDomain.java 37 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/FakeStressReplicationDomain.java 49 ●●●●● diff | view | raw | blame | history