HDFS-17081. EC: Add logic for striped blocks in isSufficientlyReplicated (#5833). Contributed by Haiyang Hu.

Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
huhaiyang 2023-07-14 14:26:54 +08:00 committed by GitHub
parent dfb351c3a8
commit c1d19c3951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1696,7 +1696,7 @@ public void verifyReplication(String src,
public boolean isSufficientlyReplicated(BlockInfo b) {
// Compare against the lesser of the minReplication and number of live DNs.
final int liveReplicas = countNodes(b).liveReplicas();
if (liveReplicas >= minReplication) {
if (hasMinStorage(b, liveReplicas)) {
return true;
}
// getNumLiveDataNodes() is very expensive and we minimize its use by