Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

storage: fix s3 storage walk-dir with empty sub-dir (#713) #733

Merged
merged 1 commit into from
Feb 3, 2021

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Feb 3, 2021

cherry-pick #713 to release-4.0
You can switch your code base to this Pull Request by using git-extras:

# In br repo:
git pr https://github.com/pingcap/br/pull/733

After apply modifications, you can push your change to this PR via:

git push [email protected]:ti-srebot/br.git pr/733:release-4.0-605037ce1716

What problem does this PR solve?

Close #712

What is changed and how it works?

The s3 implement ListObjects will return no data if set the prefix to / instead of leave it empty.

NOTE: the current implementation is compatible with minio but no s3.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch

Release Note

  • Fix the bug that WalkDir for s3 storage returns nil if the target path is bucket name.

Copy link
Collaborator

@3pointer 3pointer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@ti-srebot ti-srebot added the status/LGT1 LGTM1 label Feb 3, 2021
@kennytm
Copy link
Collaborator

kennytm commented Feb 3, 2021

/lgtm

@ti-srebot ti-srebot added status/LGT2 LGTM2 and removed status/LGT1 LGTM1 labels Feb 3, 2021
@kennytm kennytm merged commit 910cd73 into pingcap:release-4.0 Feb 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants