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

Make Lightning S3 use force-path-style=true by default (#903)#923

Merged
ti-chi-bot merged 1 commit into
pingcap:release-5.0from
ti-srebot:release-5.0-1e53766686e1
Mar 24, 2021
Merged

Make Lightning S3 use force-path-style=true by default (#903)#923
ti-chi-bot merged 1 commit into
pingcap:release-5.0from
ti-srebot:release-5.0-1e53766686e1

Conversation

@ti-srebot
Copy link
Copy Markdown
Contributor

@ti-srebot ti-srebot commented Mar 24, 2021

cherry-pick #903 to release-5.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/923

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

git push git@github.com:ti-srebot/br.git pr/923:release-5.0-1e53766686e1

What problem does this PR solve?

Lightning is different from BR and Dumpling that force-path-style is false by default. This is because both BR and Dumpling reads the storage URL through (*BackendOptions).ParseFromFlags which sets ForcePathStyle to true:

options.ForcePathStyle = true

but such adjustment is absent from Lightning.

What is changed and how it works?

We set the default ForcePathStyle to true inside storage.ParseBackend so Lightning, starting with the default backend options, will also use force-path-style=true by default.

Also fixed the unit tests on Windows.

Check List

Tests

  • Unit test

Code changes

Side effects

  • Breaking backward compatibility
    • Lightning uses force-path-style=true by default, instead of force-path-style=false.

Related changes

Release Note

  • Then importing from S3, Lightning now uses force-path-style=true by default, aligning with BR and Dumpling. To use the virtual host addressing style, explicitly set the force-path-style option like:

    ./tidb-lightning -d 's3://bucket/path?force-path-style=0&...'

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@kennytm
Copy link
Copy Markdown
Collaborator

kennytm commented Mar 24, 2021

/lgtm

@ti-srebot ti-srebot added the status/LGT1 LGTM1 label Mar 24, 2021
@overvenus
Copy link
Copy Markdown
Member

/lgtm

@ti-chi-bot
Copy link
Copy Markdown
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • overvenus

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Details

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added status/LGT2 LGTM2 and removed status/LGT1 LGTM1 labels Mar 24, 2021
@overvenus
Copy link
Copy Markdown
Member

/merge

@ti-chi-bot
Copy link
Copy Markdown
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: 0f2b6c2

@ti-chi-bot ti-chi-bot merged commit b111ed4 into pingcap:release-5.0 Mar 24, 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