From 420d0685be611af4544bcce545a380b9298c0d6a Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Fri, 28 May 2010 17:31:16 +0000
Subject: [PATCH] Fix for issue #4514 and #4533. Resolved some possible lock contention in ReplicationServerDomain, resulting in errors in logs.
---
opends/src/server/org/opends/server/replication/server/DataServerHandler.java | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/DataServerHandler.java b/opends/src/server/org/opends/server/replication/server/DataServerHandler.java
index 2b49300..1e2740d 100644
--- a/opends/src/server/org/opends/server/replication/server/DataServerHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/DataServerHandler.java
@@ -142,27 +142,20 @@
// method. This would lead to a reentrant lock which we do not want.
// So simply close the session, this will make the hang up appear
// after the reader thread that took the RSD lock realeases it.
- try
+ if (session != null)
{
- if (session != null)
+ // V4 protocol introduces a StopMsg to properly close the
+ // connection between servers
+ if (protocolVersion >= ProtocolVersion.REPLICATION_PROTOCOL_V4)
{
- // V4 protocol introduces a StopMsg to properly close the
- // connection between servers
- if (protocolVersion >= ProtocolVersion.REPLICATION_PROTOCOL_V4)
+ try
{
- try
- {
- session.publish(new StopMsg());
- } catch (IOException ioe)
- {
- // Anyway, going to close session, so nothing to do
- }
+ session.publish(new StopMsg());
+ } catch (IOException ioe)
+ {
+ // Anyway, going to close session, so nothing to do
}
- session.close();
}
- } catch (IOException e)
- {
- // ignore
}
// NOT_CONNECTED_STATUS is the last one in RS session life: handler
--
Gitblit v1.10.0