Current implementation of Comparable protocol from ClusterEndpoint is using description string, and thus creates a problem—it contains systemName in it and most important it comes before host and port. So when selectByLowestAddress kicks in Leadership it will sort nodes and choose lowest not by address, but by alphabetical order (or guess unicode order) of systemName node's variables.
As systemName is actually internal and not so important quick solution could be just to remove it from node comparison.
Current implementation of Comparable protocol from ClusterEndpoint is using description string, and thus creates a problem—it contains
systemName
in it and most important it comes before host and port. So whenselectByLowestAddress
kicks inLeadership
it will sort nodes and choose lowest not by address, but by alphabetical order (or guess unicode order) ofsystemName
node's variables.As
systemName
is actually internal and not so important quick solution could be just to remove it from node comparison.