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

Merged
merged 5 commits into from
Feb 3, 2021

Conversation

glorv
Copy link
Collaborator

@glorv glorv commented Jan 25, 2021

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.

@glorv
Copy link
Collaborator Author

glorv commented Jan 25, 2021

@kennytm @overvenus PTAL how to add a unit/integration test for this kind of compatible issues.

@glorv
Copy link
Collaborator Author

glorv commented Jan 25, 2021

/run-all-tests

@glorv glorv changed the title WIP: storage: fix s3 storage walk-dir with empty sub-dir storage: fix s3 storage walk-dir with empty sub-dir Jan 29, 2021
@glorv glorv removed the status/WIP label Jan 29, 2021
Copy link
Collaborator

@kennytm kennytm 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 Jan 31, 2021
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 removed the status/LGT1 LGTM1 label Feb 3, 2021
@ti-srebot ti-srebot added the status/LGT2 LGTM2 label Feb 3, 2021
@3pointer 3pointer merged commit 605037c into pingcap:master Feb 3, 2021
ti-srebot pushed a commit to ti-srebot/br that referenced this pull request Feb 3, 2021
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #733

kennytm pushed a commit that referenced this pull request Feb 3, 2021
Signed-off-by: ti-srebot <[email protected]>

Co-authored-by: glorv <[email protected]>
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.

WalkDir return empty results when subdir is empty
5 participants