New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDFS-16496. Snapshot diff on snapshotable directory fails with not snapshottable error #4051
Conversation
…apshottable error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 the change looks good. Thanks, @sodonnel !
💔 -1 overall
This message was automatically generated. |
The failing tests were related. One due to changing the error message and the other was because the inode in |
🎊 +1 overall
This message was automatically generated. |
…apshottable error (apache#4051)
… with not snapshottable error (apache#4051) (cherry picked from commit 49e4e4d) Change-Id: I24bb27cd100362af1e40525fabcb419241dcad18
Description of PR
Running a snapshot diff against some snapshotable folders gives an error:
This is caused by HDFS-15483 (in order snapshot delete), and the issue is in the following method in SnapshotManager:
After adding some debug, I found the directory which is the snapshot root is not an instance of INodeDirectory, but instead is an "INodeReference$DstReference". I think the directory becomes an instance of this class, if the directory is renamed and one of its children has been moved out of another snapshot.
The fix is simple - just check
inode.isDirectory()
instead.How was this patch tested?
Manually against an affected image with the problem.
For code changes: