hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject hadoop git commit: HDDS-661. When a volume fails in datanode, VersionEndpointTask#call ends up in dead lock. Contributed by Hanisha Koneru.
Date Wed, 17 Oct 2018 13:18:00 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 50715c069 -> d54f5598f


HDDS-661. When a volume fails in datanode, VersionEndpointTask#call ends up in dead lock.
Contributed by Hanisha Koneru.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d54f5598
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d54f5598
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d54f5598

Branch: refs/heads/trunk
Commit: d54f5598f4ccd1031e8295a215a3183f3647031a
Parents: 50715c0
Author: Nandakumar <nanda@apache.org>
Authored: Wed Oct 17 18:44:05 2018 +0530
Committer: Nandakumar <nanda@apache.org>
Committed: Wed Oct 17 18:44:05 2018 +0530

----------------------------------------------------------------------
 .../container/common/states/endpoint/VersionEndpointTask.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d54f5598/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/endpoint/VersionEndpointTask.java
----------------------------------------------------------------------
diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/endpoint/VersionEndpointTask.java
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/endpoint/VersionEndpointTask.java
index 2d04677..79fa174 100644
--- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/endpoint/VersionEndpointTask.java
+++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/endpoint/VersionEndpointTask.java
@@ -75,7 +75,7 @@ public class VersionEndpointTask implements
 
       // Check volumes
       VolumeSet volumeSet = ozoneContainer.getVolumeSet();
-      volumeSet.readLock();
+      volumeSet.writeLock();
       try {
         Map<String, HddsVolume> volumeMap = volumeSet.getVolumeMap();
 
@@ -94,12 +94,12 @@ public class VersionEndpointTask implements
           }
         }
         if (volumeSet.getVolumesList().size() == 0) {
-          // All volumes are inconsistent state
+          // All volumes are in inconsistent state
           throw new DiskOutOfSpaceException("All configured Volumes are in " +
               "Inconsistent State");
         }
       } finally {
-        volumeSet.readUnlock();
+        volumeSet.writeUnlock();
       }
 
       ozoneContainer.getDispatcher().setScmId(scmId);


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


Mime
View raw message