Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transport/Connection: consider attributes values for equality
Two hosts must be considered as different if their attributes differ. If we don't, on hosts list refreshing, if hosts have the same IP and port, but have updated attributes, we will always consider hosts are the same and won't take the new attributes into account. On startup, hosts do not have any attributes. On the first call of client.transport.reload_connections!, we fetch the nodes list with their attributes, remove hosts that have been disappeared and add new hosts. However, we use this equality to detect if the hosts were already in the current list of nodes or node. If the client was configured with a nodes list that have the same name as the published hostname and port, the nodes with attributes will be considered equals as nodes without and we will never save the attributes in the list. And the Selector can't use attributes.
- Loading branch information