Repository navigation
Conversation
chungen0126
reviewed
Oct 5, 2026
chungen0126
left a comment
Contributor
There was a problem hiding this comment.
Thanks @rich7420 for working on this.
Comment on lines
+1897
to
+1900
| } | ||
|
|
||
| // Root listings above are ready; other initial listings still need a start key. | ||
| if (!addedKeyPrefix()) { |
Contributor
There was a problem hiding this comment.
We don't seem to need a separate if (!addedKeyPrefix()) block here. This logic can be merged into the existing if (!addedKeyPrefix()) block above.
echonesis
reviewed
Oct 8, 2026
Comment on lines
+168
to
+180
| @ParameterizedTest | ||
| @ValueSource(strings = {"dir/", "/"}) | ||
| void shallowListingWithPrefixKeepsSeed(String prefix) throws IOException { | ||
| ClientProtocol proxy = mock(ClientProtocol.class); | ||
| when(proxy.listStatusLight(any())).thenAnswer(invocation -> | ||
| new ArrayList<>(Arrays.asList(keyStatus(prefix + "file", false)))); | ||
|
|
||
| fsoBucket(proxy).listKeys(prefix, null, true); | ||
|
|
||
| ArgumentCaptor<ListStatusLightOptions> options = ArgumentCaptor.forClass(ListStatusLightOptions.class); | ||
| verify(proxy, times(2)).listStatusLight(options.capture()); | ||
| assertTrue(options.getAllValues().get(0).isAllowPartialPrefixes()); | ||
| assertFalse(options.getAllValues().get(1).isAllowPartialPrefixes()); |
Contributor
There was a problem hiding this comment.
nit: Could we also add a case with an empty prefix and a non-empty prevKey? This would verify that marker-based listings still make both ListStatusLight calls and exclude the marker from the results.
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?
For FSO buckets, S3 ListObjects and ListObjectsV2 with
delimiter=/, an empty prefix, and no marker, start-after or continuation token first queryListStatusLightto find the starting key, then query it again to list the root entries.Start the first shallow-listing batch directly from the bucket root, preserving the first entry, ordering, pagination and permission checks. Empty buckets and requests with non-empty prefixes or markers retain their existing behavior.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16709
How was this patch tested?
A temporary S3 HTTP/OpenTelemetry probe compared 211 matching requests before and after the change. Listing results, pagination and error responses matched. OM server spans matched their client RPC spans:
ListStatusLightRPCsListStatusLightRPC26 eligible requests each saved one RPC; total OM RPCs were 1,033 → 1,007. Authorization controls used a non-secure mini-cluster with ACL checks and a custom authorizer enabled; this was not a Kerberos, Ranger or STS integration test. The temporary probe is not included in the patch. The separate 10×10 flaky-test check has not been run.