From b3fd8de34d9a827d582a8e33efdf18a958a6434d Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Tue, 15 Jun 2010 14:59:20 +0000
Subject: [PATCH] Fix possible deadlock with delete operations
---
opends/src/server/org/opends/server/replication/service/ReplicationDomain.java | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/service/ReplicationDomain.java b/opends/src/server/org/opends/server/replication/service/ReplicationDomain.java
index 23dff58..9473ec3 100644
--- a/opends/src/server/org/opends/server/replication/service/ReplicationDomain.java
+++ b/opends/src/server/org/opends/server/replication/service/ReplicationDomain.java
@@ -3668,15 +3668,18 @@
* @param serverId server where these attributes are configured.
* @param attributes the configured attributes.
*/
- synchronized public void setEclInclude(int serverId, Set<String> attributes)
+ public void setEclInclude(int serverId, Set<String> attributes)
{
- eclIncludeByServer.put(serverId, attributes);
+ synchronized(eclIncludeByServer)
+ {
+ eclIncludeByServer.put(serverId, attributes);
- // and rebuild the global list to be ready for usage
- crossServersECLIncludes.clear();
- for (Set<String> attributesByServer : eclIncludeByServer.values())
- for (String attribute : attributesByServer)
- crossServersECLIncludes.add(attribute);
+ // and rebuild the global list to be ready for usage
+ crossServersECLIncludes.clear();
+ for (Set<String> attributesByServer : eclIncludeByServer.values())
+ for (String attribute : attributesByServer)
+ crossServersECLIncludes.add(attribute);
+ }
}
/**
@@ -3698,7 +3701,10 @@
*/
public Set<String> getEclInclude(int serverId)
{
- return eclIncludeByServer.get(serverId);
+ synchronized(eclIncludeByServer)
+ {
+ return eclIncludeByServer.get(serverId);
+ }
}
/**
--
Gitblit v1.10.0