Implementation of truncate in HDFS-3107 does not allow truncating files which are in a snapshot. It is desirable to be able to truncate and still keep the old file state of the file in the snapshot.
Block and lease recovery failure caused by snapshot issue
Delete copy-on-truncate block along with the original block, when deleting a file being truncated
Fix the starting index and end condition of the loop in FileDiffList.findEarlierSnapshotBlocks()
Snapshot read can reveal future bytes for appended files.