uber-node / ringpop-node

Scalable, fault-tolerant application-layer sharding for Node.js applications
http://uber.github.io/ringpop/
MIT License
1.18k stars 146 forks source link

Emit server-added and server-removed stat on ringChanged event #281

Open btromanova opened 8 years ago

btromanova commented 8 years ago

Stat is emitted on ringChange in go-version, need to keep node version in-sync.

btromanova commented 8 years ago

Similar logic in go: https://github.com/uber/ringpop-go/blob/dev/ringpop.go#L509

Versions will still be not in sync in emitting events after this change, because node version emits ringServerAdded events on hashring.addServer (same for remove) and go version emits RingChangedEvent. But I think it's a separate issue and can be fixed later.

mennopruijssers commented 8 years ago

LGTM, can you add tests for this though?

CorgiMan commented 8 years ago

Looks good!