HDDS-10696. Fix test failure caused by empty snapshot installation#6659
Merged
adoroszlai merged 2 commits intoapache:masterfrom May 9, 2024
Merged
HDDS-10696. Fix test failure caused by empty snapshot installation#6659adoroszlai merged 2 commits intoapache:masterfrom
adoroszlai merged 2 commits intoapache:masterfrom
Conversation
szetszwo
reviewed
May 8, 2024
| Set<Path> snapshotPaths = waitForSnapshotDirs(checkpoint); | ||
| Path snapshotDir = Paths.get(OMStorage.getOmDbDir(getConf()).toString(), | ||
| OM_SNAPSHOT_DIR); | ||
| Path snapshotDir = Paths.get(getSnapshotsParentDir()).getParent(); |
Contributor
There was a problem hiding this comment.
@hemantk-12 , Why the parentDir of the getSnapshotsParentDir is the snapshotDir? Is it a typo?
Contributor
Author
There was a problem hiding this comment.
Yes, it is the naming issue in getSnapshotsParentDir.
I renamed and changed the function to return snapshotDir path directly.
I also added a comment explaining it.
Please take another look.
szetszwo
approved these changes
May 8, 2024
Contributor
szetszwo
left a comment
There was a problem hiding this comment.
@hemantk-12 , thanks for clarifying it.
+1 the change looks good.
Contributor
|
Thanks @hemantk-12 for the patch, @szetszwo for the review. |
jojochuang
pushed a commit
to jojochuang/ozone
that referenced
this pull request
May 29, 2024
…pache#6659) (cherry picked from commit 3f1a7ed)
xichen01
pushed a commit
to xichen01/ozone
that referenced
this pull request
Jul 18, 2024
…pache#6659) (cherry picked from commit 3f1a7ed)
xichen01
pushed a commit
to xichen01/ozone
that referenced
this pull request
Jul 18, 2024
…pache#6659) (cherry picked from commit 3f1a7ed)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
After applying RATIS-2045, we saw lots of integration test failures as described in the HDDS-10696.
It is because of how MiniOzoneHACluster is set up. It doesn't set value for config
ozone.om.db.dirswhich OMDBCheckpointServlet is trying to access here.So when
ozone.om.db.dirsis not set, ServerUtils#getDBPath returnsozone.metadata.dirs. Because of that snapshotDir path: is getting evaluated to/Users/iamgroot/ozone-ws/ozone/hadoop-ozone/integration-test/target/test-dir/MiniOzoneClusterImpl-e919072d-914a-4de6-9bfc-5b610697b58a/ozone-meta/db.snapshots, and the test is trying to access that doesn't exist causingNoSuchFileException.In the actual snapshotDir path is
/Users/iamgroot/ozone-ws/ozone/hadoop-ozone/integration-test/target/test-dir/MiniOzoneClusterImpl-1146c9db-bf52-4c4b-94c9-131053141484/omNode-1/db.snapshotswhich is inside the ozone data directory.To fix the issue, I changed the way we are trying to get the
snapshotDir. So rather than creating one, it will get from RDBStore after the change dir should exist by default after snapshot feature.Also removed
Flakyannotation from the test because jira: HDDS-7880 has been resolved after RATIS-1960.What is the link to the Apache JIRA
HDDS-10696
How was this patch tested?
Applied the patch on top of the changes where we saw the failure. And verify by running the full workflow and flaky-test-workflow 5x5 time.