-
Notifications
You must be signed in to change notification settings - Fork 154
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
[Improvement] Speed up ConcurrentHashMap#computeIfAbsent #519
Comments
Ouch, does If Otherwise, I'm opt for this solution. BTW, https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+Java+Versions JDK 1.8 seems to be lasting for a long time since only hadoop 3.3 supports JDK11 in runtime. |
From its implementation, it also has similar problems.
Yes. |
### What changes were proposed in this pull request? Speed up ConcurrentHashMap#computeIfAbsent by checking key existence. ### Why are the changes needed? Fix: #519. According to the bug mentioned in https://bugs.openjdk.org/browse/JDK-8161372, we could check the key existence before invoking computeIfAbsent, especially for the critical path like ShuffleTaskManager#refreshAppId. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing UT.
### What changes were proposed in this pull request? Speed up ConcurrentHashMap#computeIfAbsent by checking key existence. ### Why are the changes needed? Fix: apache#519. According to the bug mentioned in https://bugs.openjdk.org/browse/JDK-8161372, we could check the key existence before invoking computeIfAbsent, especially for the critical path like ShuffleTaskManager#refreshAppId. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing UT.
Code of Conduct
Search before asking
What would you like to be improved?
According to the bug mentioned in https://bugs.openjdk.org/browse/JDK-8161372, we could check the key existence before invoking
computeIfAbsent
, especially for the critical path likeShuffleTaskManager#refreshAppId
.The detailed fix could refer to https://juejin.cn/post/7094561581631012878
How should we improve?
No response
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: