-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HDFS-16163. Avoid locking entire blockPinningFailures map #3296
Conversation
💔 -1 overall
This message was automatically generated. |
@virajjasani Thanks for contribution. |
Thanks for taking look @ferhui. Yes this is perf optimization however I just came across this while going through an non-relevant issue in mover because of which I was comparing all the diff b/ Hadoop 2.10 and latest 3.3 release. That original issue is still under investigation but while looking into all differences, I came across HDFS-11164 and realized that just to update/add one single key->value pair, we are locking entire map and hence I thought of fixing this. I just tested this locally for it's sanity and correctness but unfortunately I don't have perf results because it was simple test. The other way to look into this is with simplicity: Unless we are updating multiple entries in single batch, we don't need to lock entire map and for single entry update, we can rather use fine-grained ConcurrentHashMap provided utilities. |
@ferhui Does this sound good? Only single map entry (not multiple) is updated at a time by any thread and hence CHM is much better candidate rather than synchronizing entire map. |
@virajjasani looks good. |
💔 -1 overall
This message was automatically generated. |
As per the latest QA results, we have all tests passing. |
💔 -1 overall
This message was automatically generated. |
Thank you for your review @ferhui. Could you please help merge this PR whenever you get some time? |
@virajjasani Thanks for contribution |
No description provided.