Skip to content

Commit

Permalink
Check if localHost is not zero token node
Browse files Browse the repository at this point in the history
  • Loading branch information
sylwiaszunejko committed Nov 14, 2024
1 parent aa6c8dc commit 54ffae3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion host_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,12 @@ func (r *ringDescriber) GetHosts() ([]*HostInfo, string, error) {
return r.prevHosts, r.prevPartitioner, err
}

hosts := append([]*HostInfo{localHost}, peerHosts...)
var hosts []*HostInfo
if !isZeroToken(localHost) {
hosts = []*HostInfo{localHost}
}
hosts = append(hosts, peerHosts...)

var partitioner string
if len(hosts) > 0 {
partitioner = hosts[0].Partitioner()
Expand Down

0 comments on commit 54ffae3

Please sign in to comment.