docs(services/s3): fix inverted comment on disable_list_objects_v2#7820
Merged
Xuanwo merged 2 commits intoJun 25, 2026
Merged
Conversation
The first line of the doc comment said disabling list objects v2 makes OpenDAL 'not use the older List Objects V1', which is the opposite of the actual behavior. Setting disable_list_objects_v2 = true makes the backend select S3ListerV1, i.e. it falls back TO the older List Objects V1. Fix the wording to 'fall back to the older List Objects V1' to match the code and the following sentence about legacy services not supporting V2.
erickguan
reviewed
Jun 25, 2026
| } | ||
|
|
||
| /// Disable list objects v2 so that opendal will not use the older | ||
| /// Disable list objects v2 so that opendal will fall back to the older |
Member
There was a problem hiding this comment.
Suggested change
| /// Disable list objects v2 so that opendal will fall back to the older | |
| /// Disable list objects v2 so that Openal will fall back to the older |
I strongly suggest deprecating disable_ functions and to use enable instead because it takes time to understand some tricky combination of configurations.
In this case, enable_legacy_list_objects_v1 would do. It has been a while since AWS deprecate this. Doc is here.
This action has been revised. We recommend that you use the newer version, ListObjectsV2, when developing applications. For backward compatibility, Amazon S3 continues to support ListObjects.
Member
There was a problem hiding this comment.
I feel enable_legacy_list_objects_v1 seems to be good but that introduce a new config. I think it's find to implement as a follow-up.
Xuanwo
approved these changes
Jun 25, 2026
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.
Which issue does this PR close?
N/A — small doc-comment fix.
Rationale
The doc comment on
S3Builder::disable_list_objects_v2describes the opposite of the actual behavior.Current first line:
But setting
disable_list_objects_v2 = truemakes the backend selectS3ListerV1(seebackend.rs, theelse if self.core.disable_list_objects_v2 { ... S3ListerV1::new(...) }branch). So disabling V2 makes OpenDAL fall back to V1, not avoid it.The wording also contradicts the very next sentence ("some legacy services do not yet support V2"), which implies falling back to V1 is the intended behavior.
This PR changes "will not use the older List Objects V1" → "will fall back to the older List Objects V1" so the comment matches the code. No functional change.
Changes
core/services/s3/src/backend.rs: one-line doc-comment wording fix.