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

长轮询模式拉取实例列表存在内存泄露 #219

Closed
libi opened this issue Dec 4, 2024 · 0 comments · Fixed by #220
Closed

长轮询模式拉取实例列表存在内存泄露 #219

libi opened this issue Dec 4, 2024 · 0 comments · Fixed by #220
Labels
bug Something isn't working

Comments

@libi
Copy link

libi commented Dec 4, 2024

长轮询实现
map增长

在addServiceWatchContext把pullContext写入了一个servicesWatch, 这个servicesWatch释放必须通过cancelWatch。
但是longPullAllInstances函数返回的cancelWatch是nil,导致调用cancelWatch无效。
最终servicesWatch内的pullContext只增不减,产生泄露。

@libi libi added the bug Something isn't working label Dec 4, 2024
sak0 added a commit that referenced this issue Dec 4, 2024
[ISSUE #219] fix:修复服务列表监听可能导致OOM
@sak0 sak0 closed this as completed in #220 Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant