HDFS-14910. Rename Snapshot with Pre Descendants Fail With IllegalArgumentException. Contributed by Wei-Chiu Chuang. (#1672)

Reviewed-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
Wei-Chiu Chuang 2019-10-24 13:09:52 -07:00 committed by GitHub
parent 2eba262472
commit a1b4eebcc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -841,7 +841,8 @@ public void cleanSubtree(ReclaimContext reclaimContext, final int snapshotId,
// If the inode has empty diff list and sf is not a
// DirectorySnapshottableFeature, remove the feature to save heap.
if (sf.getDiffs().isEmpty() &&
!(sf instanceof DirectorySnapshottableFeature)) {
!(sf instanceof DirectorySnapshottableFeature) &&
getDirectoryWithSnapshotFeature() != null) {
this.removeFeature(sf);
}
} else {