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

Ludovic Poitou
20.02.2013 9e1f377c4f21b899d16f4c62450c68691f4b42a8
refs
author Ludovic Poitou <ludovic.poitou@forgerock.com>
Thursday, June 20, 2013 17:02 +0200
committer Ludovic Poitou <ludovic.poitou@forgerock.com>
Thursday, June 20, 2013 17:02 +0200
commit9e1f377c4f21b899d16f4c62450c68691f4b42a8
tree 6b235889cabd9349166d61a5ff647e3cc54a0598 tree | zip | gz
parent 367dcd841167d003ac172edafd05b843d10ef8ee view | diff
Fix for OPENDJ-846, Intermittent Replication failure.
The issue was triggered by the mix of AssuredReplication and bad network conditions, which resulted in a deadlock between 2 RS, as both were blocked on writing to the TCP socket and not reading (because waiting on the write lock).
The solution (more of a workaround) is to have another thread for sending data to the socket and have the reader and writer posting data to send to a queue that this new thread is polling.
There are still potential deadlocks but they will occur much later, if the sendQueue gets full. The code needs more work post 2.6 to be fully non blocking, but the changes are enough for now to resolve the customer deadlock case.
1 files deleted
23 files modified
1 files renamed
782 ■■■■■ changed files
opends/src/messages/messages/replication.properties 3 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java 18 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/protocol/HeartbeatThread.java 6 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/protocol/ProtocolSession.java 170 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/protocol/ReplSessionSecurity.java 8 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/protocol/Session.java 228 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/protocol/package-info.java 5 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/DataServerHandler.java 2 ●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ECLServerHandler.java 2 ●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ECLServerWriter.java 8 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServer.java 4 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java 49 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java 2 ●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ServerHandler.java 28 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ServerReader.java 20 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ServerWriter.java 8 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/package-info.java 8 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/CTHeartbeatPublisherThread.java 8 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/HeartbeatMonitor.java 8 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ReplicationBroker.java 20 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ReplicationDomain.java 6 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java 55 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/AssuredReplicationPluginTest.java 66 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/AssuredReplicationServerTest.java 30 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java 20 ●●●● diff | view | raw | blame | history