wvanbergen / kazoo-go

Go library to access Kafka metadata in Zookeeper
http://godoc.org/github.com/wvanbergen/kazoo-go
MIT License
100 stars 48 forks source link

Handle race when many consumers call ResetOffsets #22

Closed davidreynolds closed 8 years ago

davidreynolds commented 8 years ago

There can be a race condition when many consumers in a group are trying to reset offsets. This happens in the gap between checking if a zk node exists and deleting the node.

A way to handle this is to check if the error returned by Delete is zk.ErrNoNode and ignoring it.