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

【高优先级】在discovery模块中实现Etcd服务发现逻辑 #578

Closed
iSuperCoder opened this issue Jul 12, 2023 · 4 comments · Fixed by #605
Closed

【高优先级】在discovery模块中实现Etcd服务发现逻辑 #578

iSuperCoder opened this issue Jul 12, 2023 · 4 comments · Fixed by #605
Assignees

Comments

@iSuperCoder
Copy link
Contributor

image

可参考arana-db中的etcd服务发现逻辑:
https://github.com/arana-db/arana/blob/master/pkg/registry/etcd/discovery.go

@Issues-translate-bot
Copy link

RoBot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


image

You can refer to the etcd service discovery logic in arana-db:
https://github.com/arana-db/arana/blob/master/pkg/registry/etcd/discovery.go

@yizhibian
Copy link
Contributor

I want to try #578, pls assign to me

@iSuperCoder iSuperCoder changed the title 在discovery模块中实现Etcd服务发现逻辑 【高优先级】在discovery模块中实现Etcd服务发现逻辑 Jul 22, 2023
@yizhibian
Copy link
Contributor

@iSuperCoder 抱歉之前因为有些事耽搁了这个任务,我在做这个任务的时候遇到了一个问题想和老师请教一下。
我看了seata用etcd做服务注册中心的源码,为什么seata将服务信息注册到etcd时其格式是registry-seata-CLUSTER_NAME-ADDRESS而不是registry-seata-CLUSTER_NAME呢?为什么需要通过服务本身的地址作为key的一部分呢?
image
如果我理解有误,希望老师指出,谢谢!

@Issues-translate-bot
Copy link

RoBot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@iSuperCoder Sorry for delaying this task because of some things. I encountered a problem when doing this task and would like to ask the teacher for advice.
I read the source code of seata using etcd as a service registry. Why does seata register service information in etcd in the format registry-seata-CLUSTER_NAME-ADDRESS instead of registry-seata-CLUSTER_NAME? Why do you need to use the address of the service itself as part of the key?
image
If I understand something wrong, I hope the teacher will point it out, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants