You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Mukul Kumar Singh (JIRA)" <ji...@apache.org> on 2017/11/05 07:09:00 UTC
[jira] [Created] (RATIS-134) PeerProxyMap#addPeers should add peers
only if it is not already present in the proxymap
Mukul Kumar Singh created RATIS-134:
---------------------------------------
Summary: PeerProxyMap#addPeers should add peers only if it is not already present in the proxymap
Key: RATIS-134
URL: https://issues.apache.org/jira/browse/RATIS-134
Project: Ratis
Issue Type: Bug
Reporter: Mukul Kumar Singh
Assignee: Mukul Kumar Singh
{{PeerProxyMap#addPeers}} currently adds peers to the proxyMap without checkint the current state. This should be optimized to allow addition only if the peer is not present in the proxyMap.
{code}
public void addPeers(Iterable<RaftPeer> newPeers) {
for(RaftPeer p : newPeers) {
peers.put(p.getId(), new PeerAndProxy(p));
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)