HDFS-4845. FSNamesystem.deleteInternal should acquire write-lock before changing the inode map. Contributed by Arpit Agarwal
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1492941 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f0eb4bc342
commit
4cd605413a
|
@ -571,6 +571,9 @@ Release 2.1.0-beta - UNRELEASED
|
|||
HDFS-4586. TestDataDirs.testGetDataDirsFromURIs fails with all directories
|
||||
in dfs.datanode.data.dir are invalid. (Ivan Mitic via atm)
|
||||
|
||||
HDFS-4845. FSNamesystem.deleteInternal should acquire write-lock before
|
||||
changing the inode map. (Arpit Agarwal via szetszwo)
|
||||
|
||||
BREAKDOWN OF HDFS-347 SUBTASKS AND RELATED JIRAS
|
||||
|
||||
HDFS-4353. Encapsulate connections to peers in Peer and PeerServer classes.
|
||||
|
|
|
@ -2933,7 +2933,12 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|||
getEditLog().logSync();
|
||||
removeBlocks(collectedBlocks); // Incremental deletion of blocks
|
||||
collectedBlocks.clear();
|
||||
dir.removeFromInodeMap(removedINodes);
|
||||
dir.writeLock();
|
||||
try {
|
||||
dir.removeFromInodeMap(removedINodes);
|
||||
} finally {
|
||||
dir.writeUnlock();
|
||||
}
|
||||
removedINodes.clear();
|
||||
if (NameNode.stateChangeLog.isDebugEnabled()) {
|
||||
NameNode.stateChangeLog.debug("DIR* Namesystem.delete: "
|
||||
|
|
Loading…
Reference in New Issue