This is an automated email from the ASF dual-hosted git repository.
ayushsaxena pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 753a5b7 HDDS-5715. Make XceiverServerRatis#raftGids a thread-safe
set. (#2613)
753a5b7 is described below
commit 753a5b7177771f4e7488fa9849697da90dc13d06
Author: Gui Hecheng <[email protected]>
AuthorDate: Sat Sep 11 04:27:23 2021 +0800
HDDS-5715. Make XceiverServerRatis#raftGids a thread-safe set. (#2613)
---
.../container/common/transport/server/ratis/XceiverServerRatis.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
index f237629..97d712e 100644
---
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
+++
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
@@ -25,7 +25,6 @@ import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -140,7 +139,7 @@ public final class XceiverServerRatis implements
XceiverServerSpi {
private final ConfigurationSource conf;
// TODO: Remove the gids set when Ratis supports an api to query active
// pipelines
- private final Set<RaftGroupId> raftGids = new HashSet<>();
+ private final Set<RaftGroupId> raftGids = ConcurrentHashMap.newKeySet();
private final RaftPeerId raftPeerId;
// pipelines for which I am the leader
private Map<RaftGroupId, Boolean> groupLeaderMap = new ConcurrentHashMap<>();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]