Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
etcd discovery now correctly identifies IsOwner when updating the pee…
Browse files Browse the repository at this point in the history
…rs list
  • Loading branch information
thrawn01 committed Oct 23, 2020
1 parent 3d111f8 commit 5f281e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.2] - 2020-10-23
### Change
* ETCD discovery now sets the IsOwner property when updating the peers list.

## [0.9.1] - 2020-10-19
### Change
* Fix GUBER_PEER_PICKER_HASH and GUBER_PEER_PICKER
Expand Down
6 changes: 5 additions & 1 deletion etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,11 @@ func (e *EtcdPool) callOnUpdate() {
var peers []PeerInfo

for k := range e.peers {
peers = append(peers, PeerInfo{Address: k})
if k == e.conf.AdvertiseAddress {
peers = append(peers, PeerInfo{Address: k, IsOwner: true})
} else {
peers = append(peers, PeerInfo{Address: k})
}
}

e.conf.OnUpdate(peers)
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.1
0.9.2

0 comments on commit 5f281e3

Please sign in to comment.