HDDS-5866. Discrepancy in Trash directory in ofs vs o3fs.#3906
Merged
neils-dev merged 5 commits intoapache:masterfrom Nov 3, 2022
Merged
HDDS-5866. Discrepancy in Trash directory in ofs vs o3fs.#3906neils-dev merged 5 commits intoapache:masterfrom
neils-dev merged 5 commits intoapache:masterfrom
Conversation
sadanand48
commented
Oct 28, 2022
Contributor
Author
There was a problem hiding this comment.
This test is flaky as it checks for existence of key in /Current but the checkpoint interval is 1.5 seconds so it might already be in checkpoint directory. This part is already tested in testTrash , hence removing this test.
neils-dev
reviewed
Nov 1, 2022
...one/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystem.java
Outdated
Show resolved
Hide resolved
Contributor
|
+1 |
neils-dev
approved these changes
Nov 2, 2022
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?
When moving a file/dir to trash, the destination path is different for ofs and o3fs. The change here is to make it same for both.
Omitting volume and bucket for ofs key since its redundant info as for a particular ozone key already volume and bucket is known.
Most of the code for moveToTrash is duplicated from the hadoop client code and only the below if condition is a modification to the method.
If this part is not duplicated and the path is trimmed of volume and bucket name and passed to
super.moveToTrash(path)it will fail as part of getFileStatus call as it would callgetFileStatus(ofs://serviceId/key).What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-5866
How was this patch tested?
unit test