[HDFS-16064] backporting HDFS-16064. Determine when to invalidate corrupt replicas based on number of usable replicas (#4410)#6437
Conversation
| return minReplication; | ||
| } | ||
|
|
||
| public short getMinStorageNum(BlockInfo block) { |
There was a problem hiding this comment.
I was originally trying to make it in sync with what trunk branch is doing: https://github.com/apache/hadoop/pull/4410/files#diff-305ecf45a0f0708849b5e3c0d21a56c681db3a1497e52a19ef24939278dc99feL1922-R1926
Let me revert this change
…based on number of usable replicas
447f90e to
6df043a
Compare
| expectedRedundancies; | ||
|
|
||
| boolean minReplicationSatisfied = | ||
| numberOfReplicas.liveReplicas() >= minReplication; |
There was a problem hiding this comment.
| numberOfReplicas.liveReplicas() >= minReplication; | |
| numUsableReplicas >= minReplication; |
|
@zz12341 branch-2.10 is the active branch for 2.10 (not branch-2.10.0). You can see all the active branches here. |
|
We're closing this stale PR because it has been open for 100 days with no activity. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |

Description of PR
HDFS-16064 fixed an issue where decommissioning replicas were not counted as usable replicas, which caused decom to stuck forever in the case of small clusters. We are seeing the same issue on 2.10, and thus backporting the changes.
How was this patch tested?
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?