bug in WatchTree for etcd

Open
#166 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
28/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go

Research direction

Start by tracing WatchTree, the etcd client watch event, and the subsequent List request. Reproduce or test the case where List reaches a raft-lagging server and returns unchanged KVPair values. Done means WatchTree observes a consistent state by routing List to the event's server or enforcing the required raft index, with tests covering the race.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Go
Stars
847
Forks
204
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from docker/libkv

All issues in docker/libkv

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.