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

服务注销问题 #139

Open
hzl484 opened this issue Mar 20, 2023 · 4 comments
Open

服务注销问题 #139

hzl484 opened this issue Mar 20, 2023 · 4 comments

Comments

@hzl484
Copy link

hzl484 commented Mar 20, 2023

在selector/cache/cache.go文件中,监听到consul的delete消息且某一类节点的数量为0时,会直接删除这一类型的节点,而不会去删除这些节点对应的session
image
节点的数量不为0时delete,就会正常删除服务和对应的session
image
image

@liangdas
Copy link
Owner

liangdas commented Apr 6, 2023

这个逻辑会有什么问题吗?

@hzl484
Copy link
Author

hzl484 commented Apr 6, 2023

这个逻辑会有什么问题吗?

162行删除节点的时候不会执行Watcher去删除这些节点对应的session

@hzl484
Copy link
Author

hzl484 commented Apr 10, 2023

比如开了两个类型的服务,login和game,login是单开的。如果只开一个game节点,重启这个game,login的rpc会发到重启之前的game上去,就是session没删掉。game多开,重启单个game就是正常的。

@Creat-qc
Copy link

Creat-qc commented Nov 15, 2023

session的存储不是需要自己实现吗,这个可以通过 验证 session的连通性 判断,不连通的话就删除记录

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

3 participants