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
Fixes possible leak caused by concurrent add/remove of IMap interceptors #7531
Fixes possible leak caused by concurrent add/remove of IMap interceptors #7531
Conversation
181ec3c
to
4fb119c
Compare
35c11be
to
fc29a6f
Compare
Map<String, MapInterceptor> tmpMap = new HashMap<String, MapInterceptor>(id2InterceptorMap); | ||
tmpMap.put(id, interceptor); | ||
|
||
id2InterceptorMap = tmpMap; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also wrap with Collections.unmodifiableMap()
? Readers should not be able to modify.
id2InterceptorMap = Collections.unmodifiableMap(tmpMap);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
fc29a6f
to
bdf6fd9
Compare
👍 |
Will you backport this? |
👍 |
…eLeak Fixes possible leak caused by concurrent add/remove of IMap interceptors
@mdogan backport is on the way. |
Fixes the leak which is introduced in PR #3993
closes #7520