You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discussed during sig-etcd triage meeting. @ahrtr is this a valid bug or should we close it given we have a workaround of opening new client before watch?
Bug report criteria
What happened?
When a token expires, creating a new watch will cause all other watches to become invalid.
What did you expect to happen?
Creating a watch and waiting for the token to expire after 10 seconds, and then creating another watch will cause all watches to become invalid.
How can we reproduce it (as minimally and precisely as possible)?
start etcd:
./etcd --listen-peer-urls http://0.0.0.0:2380 --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379 --auth-token-ttl 10
start grpc-proxy:
./etcd grpc-proxy start --endpoints=0.0.0.0:2379 --listen-addr=0.0.0.0:23790
test example:
`
package main
import (
"context"
"fmt"
clientv3 "go.etcd.io/etcd/client/v3"
"google.golang.org/grpc"
"time"
)
func main() {
cli, _ := clientv3.New(clientv3.Config{
Endpoints: []string{"centos7:23790"},
DialTimeout: time.Second * 5,
DialOptions: []grpc.DialOption{grpc.WithBlock()},
})
fmt.Println("start")
ctx, _ := context.WithCancel(context.Background())
ch := cli.Watch(ctx, "/key")
for resp := range ch {
if resp.Err() != nil {
fmt.Println(resp.Err())
}
for _, e := range resp.Events {
k, v := e.Kv.Key, e.Kv.Value
fmt.Println(k, v)
}
}
}
`
Anything else we need to know?
No response
Etcd version (please run commands below)
Etcd configuration (command line flags or environment variables)
paste your configuration here
Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)
Relevant log output
No response
The text was updated successfully, but these errors were encountered: