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:10:00 UTC

[jira] [Updated] (RATIS-134) PeerProxyMap#addPeers should add peers only if it is not already present in the proxymap

     [ https://issues.apache.org/jira/browse/RATIS-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mukul Kumar Singh updated RATIS-134:
------------------------------------
    Attachment: RATIS-134.001.patch

> 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
>         Attachments: RATIS-134.001.patch
>
>
> {{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)