docker / libkv

Distributed key/value store abstraction library
Apache License 2.0
853 stars 205 forks source link

bug in WatchTree for etcd #166

Open spacejam opened 7 years ago

spacejam commented 7 years ago

WatchTree uses List on the target directory after receiving a watch event from the etcd client. There is no guarantee that the server that receives the later List request is the same one that triggered the previous Watch event. If the one that receives the List event is behind in the raft replication stream, the WatchTree chan will return an unchanged set of KVPair's. This can be fixed by either sending the List to the same server, or ensuring that whatever server receives the List command has a raft index >= the server that sent the Watch update.