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-16420. Avoid deleting unique data blocks when deleting redundancy striped blocks. #3880
Conversation
@Hexiaoqiao @ayushtkn Please take a look at this PR. We have started testing in this way. |
🎊 +1 overall
This message was automatically generated. |
@Jackson-Wang-7 Thanks for submitting the PR. It makes sense to me. Could you fix the check style issues? |
...-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java
Outdated
Show resolved
Hide resolved
...-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java
Outdated
Show resolved
Hide resolved
...-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java
Outdated
Show resolved
Hide resolved
d26ee09
to
22121df
Compare
…y striped blocks.
22121df
to
87ea3b1
Compare
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.
+1, pending Jenkins.
💔 -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.
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.
Thanks for fixing this issue, @Jackson-Wang-7. Thanks for reviewing it, @tomscut. |
…y striped blocks. (#3880) Reviewed-by: litao <tomleescut@gmail.com> Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
…y striped blocks. (apache#3880) Reviewed-by: litao <tomleescut@gmail.com> Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
…y striped blocks. (apache#3880) Reviewed-by: litao <tomleescut@gmail.com> Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
…ng redundancy striped blocks. (apache#3880) Reviewed-by: litao <tomleescut@gmail.com> Signed-off-by: Takanobu Asanuma <tasanuma@apache.org> (cherry picked from commit d886282) (cherry picked from commit 74d3e83) Change-Id: I7d0b88180cb8643e6dca7f7922b350b3c82ac2f6 (cherry picked from commit 171d1bfc7ecd981ebea087a70827a9eb1680a6b6) (cherry picked from commit 0e45563bccc59ef3d456210ebd3c35f0461ed90e)
hello, @Jackson-Wang-7 Does this fix adapt to Hadoop 3.1 version? |
Description of PR
if there are two or more blocks exist in a same rack, it may cause unique data block is added to exactlyOne processing list when choosing redundancy stripted block to delete.
`
`
In this case, moreThanOne list may not contain the remaining block. The remaining block shouldn’t be deleted, but it is added to exactlyOne list. And then it will be deleted.
How was this patch tested?
The testcase is that:(EC 6+3)
blk_-xxx009 in rack /d1/r1
blk_-xxx008 in rack /d1/r1
blk_-xxx008 in rack /d1/r2
blk_-xxx008 in rack /d1/r3
blk_-xxx007 in rack /d1/r4
blk_-xxx006 in rack /d2/r1
blk_-xxx005 in rack /d2/r2
blk_-xxx004 in rack /d2/r3
blk_-xxx003 in rack /d2/r4
blk_-xxx002 in rack /d2/r5
blk_-xxx001 in rack /d2/r6
After the FBR is triggered and redundant data blocks are added to invalidate list, blk_-xxx008 in rack /d1/r1 and blk_-xxx008 in rack /d1/r2 need to be deleted, blk_-xxx009 is HEALTHY.