-
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-16511. Improve lock type for ReplicaMap under fine-grain lock mode. #4085
Conversation
💔 -1 overall
This message was automatically generated. |
75c2505
to
6bb11d4
Compare
@MingXiangLi It seems like you've mentioned the wrong JIRA in the title. Could you please fix it? |
🎊 +1 overall
This message was automatically generated. |
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.
Thanks @MingXiangLi for your works. Improve lock type makes sense to me here. Just suggest to update unit test to cover expected case.
...s/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
Outdated
Show resolved
Hide resolved
...s/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
Outdated
Show resolved
Hide resolved
for (Future<?> f : futureList) { | ||
f.get(); | ||
} | ||
int totalNumReplicas = 0; |
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.
Suggest to verify different blockpool's blocks num separately here. Sum them will loss some key information such as above comment.
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.
like testRemoveTwoVolumes(),we random write to block pool, so we final count the total block of all block pool.
6bb11d4
to
d0b8d1a
Compare
💔 -1 overall
This message was automatically generated. |
d0b8d1a
to
45a5d13
Compare
🎊 +1 overall
This message was automatically generated. |
...s/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
Outdated
Show resolved
Hide resolved
45a5d13
to
13c272d
Compare
🎊 +1 overall
This message was automatically generated. |
13c272d
to
8933cd9
Compare
💔 -1 overall
This message was automatically generated. |
8933cd9
to
37f61a4
Compare
37f61a4
to
07c05c3
Compare
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
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.
LGTM. +1.
…de. (#4085). Contributed by limingxiang. Signed-off-by: He Xiaoqiao <[email protected]>
Committed to trunk. Thanks @MingXiangLi for your contributions! Thanks @tomscut for your reviews! |
…de. (apache#4085). Contributed by limingxiang. Signed-off-by: He Xiaoqiao <[email protected]>
In HDFS-16429 we make LightWeightResizableGSet to be thread safe, and In HDFS-15382 we have split lock to block pool grain locks.After these improvement, we can change some method to acquire read lock replace to acquire write lock.
The lock now in ReplicaMap is protect replicaInfo message.But now it have been protect by lock in LightWeightResizableGSet.