smallnest / rpcx-ui

rpcx manager web ui
218 stars 60 forks source link

为什么一个地址出现了两次? #12

Open dhjack opened 4 years ago

dhjack commented 4 years ago

image

$ ./etcdctl get / --prefix

/rpcx_test rpcx_path /rpcx_test/Arith Arith /rpcx_test/Arith/tcp@localhost:8888 state=active&tps=

smallnest commented 4 years ago

这个不应该,可以稳定复现么?或者你跟踪一下代码,看看rpcx从etcd读取出来的数据是一个还是两个?

dhjack commented 4 years ago

加了点打印:node会重复一次 2020/09/13 21:13:01 show kvs:[0xc00029e0c0 0xc00029e0f0] 2020/09/13 21:13:01 show nodes:[0xc0001f5a10 0xc0001f5a40] 2020/09/13 21:13:01 add services:&{L3JwY3hfdGVzdEBBcml0aA== /rpcx_test Arith Arith active } 2020/09/13 21:13:01 add services:&{QXJpdGhAdGNwQGxvY2FsaG9zdDo4ODg4 Arith tcp@localhost:8888 active } 2020/09/13 21:13:01 show nodes:[0xc00029e4b0] 2020/09/13 21:13:01 add services:&{QXJpdGhAdGNwQGxvY2FsaG9zdDo4ODg4 Arith tcp@localhost:8888 active }

代码: diff --git a/etcdv3_service.go b/etcdv3_service.go index 5e43453..da05970 100644 --- a/etcdv3_service.go +++ b/etcdv3_service.go @@ -37,6 +37,7 @@ func (r EtcdV3Registry) fetchServices() []Service { return services }

landbed commented 3 years ago

+1 for this issue.

xiaogogonuo commented 2 years ago

image image

确实有2个一样的

QuaidChen commented 2 years ago

+1 for this issue.

smallnest commented 2 years ago

e嗯嗯,待我验证下

anden007 commented 2 years ago

+1 for this issue.