HDFS-4165. Faulty sanity check in FsDirectory.unprotectedSetQuota. Contributed by Binglin Chang.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1407245 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2012-11-08 19:54:55 +00:00
parent 1813fb0132
commit 0f7a4337ac
2 changed files with 5 additions and 2 deletions

View File

@ -248,6 +248,9 @@ Trunk (Unreleased)
HDFS-4106. BPServiceActor#lastHeartbeat, lastBlockReport and HDFS-4106. BPServiceActor#lastHeartbeat, lastBlockReport and
lastDeletedReport should be volatile. (Jing Zhao via suresh) lastDeletedReport should be volatile. (Jing Zhao via suresh)
HDFS-4165. Faulty sanity check in FsDirectory.unprotectedSetQuota.
(Binglin Chang via suresh)
BREAKDOWN OF HDFS-3077 SUBTASKS BREAKDOWN OF HDFS-3077 SUBTASKS
HDFS-3077. Quorum-based protocol for reading and writing edit logs. HDFS-3077. Quorum-based protocol for reading and writing edit logs.

View File

@ -1849,9 +1849,9 @@ INodeDirectory unprotectedSetQuota(String src, long nsQuota, long dsQuota)
assert hasWriteLock(); assert hasWriteLock();
// sanity check // sanity check
if ((nsQuota < 0 && nsQuota != HdfsConstants.QUOTA_DONT_SET && if ((nsQuota < 0 && nsQuota != HdfsConstants.QUOTA_DONT_SET &&
nsQuota < HdfsConstants.QUOTA_RESET) || nsQuota != HdfsConstants.QUOTA_RESET) ||
(dsQuota < 0 && dsQuota != HdfsConstants.QUOTA_DONT_SET && (dsQuota < 0 && dsQuota != HdfsConstants.QUOTA_DONT_SET &&
dsQuota < HdfsConstants.QUOTA_RESET)) { dsQuota != HdfsConstants.QUOTA_RESET)) {
throw new IllegalArgumentException("Illegal value for nsQuota or " + throw new IllegalArgumentException("Illegal value for nsQuota or " +
"dsQuota : " + nsQuota + " and " + "dsQuota : " + nsQuota + " and " +
dsQuota); dsQuota);