-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-10300. InstallSnapshot may fail if OM metadata dir and OM DB dir are in different local storage partitions. #6226
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
Changes from all commits
ddc682a
919016a
114b1d4
386856e
fcdd82d
e7b5925
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,7 +66,7 @@ public void testLinkFiles(@TempDir File tempDir) throws Exception { | |
| assertFalse(tree2.exists()); | ||
| assertFalse(f1Link.exists()); | ||
|
|
||
| OmSnapshotUtils.linkFiles(tree1, tree2); | ||
| OmSnapshotUtils.linkFilesOrCopy(tree1, tree2); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add similar test case for copy case, when both files are in different partitions. You can achieve this by mocking the layer.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mocking this isSamePartition function should help. From what I know you cannot mock Files interface through mockito but PowerMockito can do it. |
||
|
|
||
| // Expected files/links should exist now. | ||
| assertTrue(tree2.exists()); | ||
|
|
||
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.
Is replace existing correct? Can this kind of a situation occur where we are re-copying stuff? We shouldn't inadvertently delete data.
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.
Can we do some kind of a checksum verification if the fullToPath exists.
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.
The file shouldn't exist at all, I'm doing a replace just as a precaution. I'm following the normal OM bootstrap process, We don't do a checksum check for that either.