NinesStack / sidecar

Gossip-based service discovery. Docker native, but supports non-container discovery, too.
MIT License
69 stars 7 forks source link

Parked: Tombstone services before sending updates #50

Open mihaitodor opened 5 years ago

mihaitodor commented 5 years ago

Services from expired servers need to be tombstoned before informing the listeners about them, I think :)

In TombstoneOthersServices, we have here a similar call to state.ServiceChanged, where the services get tombstoned first.

LE: There is another problem with missed events due to having a timestamp older than the current state in the receiver, which I tried to fix in 7211a4f, but it's not going to work as is because once the first event is processed by the receiver, the receiver state will contain a timestamp that is newer than all the ChangeEvent.Time of all the other events sent when a server gets expired...