Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

服务下线,其实并未从客户端将命名解析删除 #1

Closed
ztgoto opened this issue Sep 17, 2018 · 1 comment
Closed

服务下线,其实并未从客户端将命名解析删除 #1

ztgoto opened this issue Sep 17, 2018 · 1 comment

Comments

@ztgoto
Copy link

ztgoto commented Sep 17, 2018

watcher.go
return []*naming.Update{{Op: naming.Delete, Addr: string(ev.Kv.Value)}}, nil
当服务从etcd下线,客户端watch检测到删除事件,但是其实删除事件中并未携带删除的值,只携带了键,所以ev.Kv.Value是一个空字符串。这时候在 google.golang.org/grpc/balancer.go 185L 会与本地的地址列表匹配不上,导致并未执行命名地址列表的删除操作

@wwcd wwcd closed this as completed in 863b1d1 Sep 18, 2018
@wwcd
Copy link
Owner

wwcd commented Sep 18, 2018

thx!

在删除时,应该使用PreKv来代替Kv

wwcd pushed a commit that referenced this issue Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants