dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

Memory leak risk in ConsistentHashLoadBalance?

Open LNAmp opened this issue 8 years ago • 4 comments

ConsistentHashLoadBalance holds a map of ConsistentHashSelector, the key is the identityHashCode of all valid invokers. So when invoker list changed or invoker's filed(url, attachment) changed, a new ConsistentHashSelector will be construct.

LNAmp avatar Jan 03 '18 03:01 LNAmp

Hello, this problem I have figure out in #1123 , and try to pull request to fix it #1144 。 Please stay focused~ And if there are any suggestions, please send them to me. Thank you~

kirayunfei avatar Jan 04 '18 04:01 kirayunfei

我看过这个issue,情况貌似还不一样,我先看看你的issue及pr

LNAmp avatar Jan 04 '18 11:01 LNAmp

嗯,pr里包含了一个fix,是关于由于每次调用根据invoker构建hash环使用的identityHashCode都不同,导致每次调用hash环都会被重建的问题

kirayunfei avatar Jan 04 '18 11:01 kirayunfei

I think we can discuss the problems of ConsistentHashLoadbalance in #1144, this PR also mentioned the memory leak problem.

chickenlj avatar Feb 17 '18 11:02 chickenlj