-
Notifications
You must be signed in to change notification settings - Fork 590
HDDS-9065. [FSO]ListKeys: Incorrect result when keyPrefix matching multiple exist keys. #6072
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
Conversation
|
@whbing would you like to take a look? |
|
@sadanand48 Thanks for working on this ! Overall looks good. ozone/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneBucket.java Lines 1638 to 1639 in 2434689
|
| this.omDefaultReplication = omDefaultReplication; | ||
| } | ||
|
|
||
| @SuppressWarnings("methodlength") |
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.
NIT: To avoid reaching methodlength, perhaps we can organize the code a bit. We can eliminate some unnecessary line breaks because there is no longer an 80-character line limit. Such as the following.
ozone/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneListStatusHelper.java
Lines 96 to 102 in 2434689
| final String bucketKey = metadataManager.getBucketKey(volumeName, | |
| bucketName); | |
| final OmVolumeArgs volumeInfo = metadataManager.getVolumeTable() | |
| .get(volumeKey); | |
| final OmBucketInfo omBucketInfo = metadataManager.getBucketTable() | |
| .get(bucketKey); |
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 there a good tool which can help us format this project?
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.
Maybe even can be split into several methods (validate parameters, handle different cases, collect results, etc.).
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.
Thanks , I have refactored the method now.
Thanks for the review @whbing , listStatusLight calls listStatus internally, It only trims the keyInfo object to be sent over the wire. |
aryangupta1998
left a comment
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.
LGTM
|
Thanks @sadanand48 for the patch, @TaiJuWu, @adoroszlai, and @whbing for the reviews! |
What changes were proposed in this pull request?
Fix cases when the keyPrefix pertains to a particular file/dir . For more details on the problem check jira description.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9065
How was this patch tested?
Unit tests.