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

gcs: compatible with old gcs bug #677

Merged
merged 27 commits into from
Jan 11, 2021
Merged

gcs: compatible with old gcs bug #677

merged 27 commits into from
Jan 11, 2021

Conversation

3pointer
Copy link
Collaborator

@3pointer 3pointer commented Jan 5, 2021

What problem does this PR solve?

solve #675

What is changed and how it works?

for case 1: add a check before Read & Write meta file, decide which prefix to use.
for case 2: check whether sst file is in Prefix(after #647) or in PrefixSlash(before #647), adjust proper prefix for TiKV request.

Check List

Tests

  • Integration test

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release Note

  • Fix the issue that br 4.0.9 cannot restore br 4.0.8 gcs backup files.

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.

This PR will also affect all non-BR users of this package. can you do we fix outside gcsStorage? Especially not do the request inside objectName since it affects all GCS calls not just "reading backupmeta"

@3pointer
Copy link
Collaborator Author

3pointer commented Jan 5, 2021

This PR will also affect all non-BR users of this package. can you do we fix outside gcsStorage? Especially not do the request inside objectName since it affects all GCS calls not just "reading backupmeta"

You are right. Let me think

Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

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

Please move compatibility code to a new package compat.

pkg/task/common.go Show resolved Hide resolved
@3pointer 3pointer changed the title WIP: gcs: compatible with old gcs bug gcs: compatible with old gcs bug Jan 8, 2021
@3pointer
Copy link
Collaborator Author

3pointer commented Jan 8, 2021

/run-integration-tests

2 similar comments
@3pointer
Copy link
Collaborator Author

3pointer commented Jan 8, 2021

/run-integration-tests

@3pointer
Copy link
Collaborator Author

3pointer commented Jan 8, 2021

/run-integration-tests

@overvenus
Copy link
Member

LGTM

@ti-srebot ti-srebot added the status/LGT1 LGTM1 label Jan 8, 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.

rest LGTM

go.mod1 Outdated
@@ -38,3 +38,8 @@ require (
google.golang.org/grpc v1.27.1
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0
)

replace (
cloud.google.com/go/storage => github.com/3pointer/google-cloud-go/storage v1.6.1-0.20210108125931-b59bfa0720b2
Copy link
Collaborator

Choose a reason for hiding this comment

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

(googleapis/google-cloud-go#3509 for future reference)

go.mod1 Outdated Show resolved Hide resolved
pkg/storage/gcs.go Outdated Show resolved Hide resolved
pkg/task/common.go Outdated Show resolved Hide resolved
tests/br_gcs/oauth.py Show resolved Hide resolved
pkg/task/common.go Outdated Show resolved Hide resolved
pkg/task/common.go Outdated Show resolved Hide resolved
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 status/LGT2 LGTM2 and removed status/LGT1 LGTM1 labels Jan 11, 2021
@3pointer
Copy link
Collaborator Author

/run-integration-test

@3pointer
Copy link
Collaborator Author

/run-all-tests

@3pointer 3pointer merged commit 3de76b2 into pingcap:master Jan 11, 2021
@3pointer
Copy link
Collaborator Author

/run-cherry-picker

ti-srebot pushed a commit to ti-srebot/br that referenced this pull request Jan 11, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #688

ti-srebot pushed a commit to ti-srebot/br that referenced this pull request Jan 11, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-5.0-rc in PR #689

kennytm pushed a commit that referenced this pull request Jan 11, 2021
* cherry pick #677 to release-4.0

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

* resolve conflict

* fix ci

* fix tiflash kill issue

Co-authored-by: 3pointer <luancheng@pingcap.com>
kennytm pushed a commit that referenced this pull request Jan 11, 2021
* cherry pick #677 to release-5.0-rc

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

* fix build

Co-authored-by: 3pointer <luancheng@pingcap.com>
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