Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Calls made to specific host:port should not add to the peer list #464

Description

@prashantv

If a call is made with hostport=..., then the value is added as a new peer to the peer list. If the user has a shared peer list, but explicitly wants to talk to some other service directly, then the pollution means the direct service host:port is now part of the shared peer lists, and any call could use this host:port.

Comment from @abhinav:

The fix for this is not too complicated. We need to change the peer
selection code to not add the hostport to the list of peers if it was
specified explicitly.

Right now, choose does get(hostport) when the hostport is
specified explicitly. get calls add if the hostport is not a known
peer.

https://github.com/uber/tchannel-python/blob/master/tchannel/tornado/peer.py#L706
https://github.com/uber/tchannel-python/blob/master/tchannel/tornado/peer.py#L637

Instead we will have to change it to build a Peer but not add it to
the list when hostport is specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions