This is an automated email from the ASF dual-hosted git repository.

ayushsaxena pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new c1d19c39517 HDFS-17081. EC: Add logic for striped blocks in 
isSufficientlyReplicated (#5833). Contributed by Haiyang Hu.
c1d19c39517 is described below

commit c1d19c39517df1944c01b90ae738239b465f6664
Author: huhaiyang <huhaiyang...@126.com>
AuthorDate: Fri Jul 14 14:26:54 2023 +0800

    HDFS-17081. EC: Add logic for striped blocks in isSufficientlyReplicated 
(#5833). Contributed by Haiyang Hu.
    
    Signed-off-by: Ayush Saxena <ayushsax...@apache.org>
---
 .../org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
index fab3619cb2c..e09fe7fbd9b 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
@@ -1696,7 +1696,7 @@ public class BlockManager implements BlockStatsMXBean {
   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


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to