Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snapshot_backup: deny executing tidb-lightning import while running snapshot_backup #47001

Merged
merged 15 commits into from
Sep 27, 2023

Conversation

YuJuncen
Copy link
Contributor

What problem does this PR solve?

Issue Number: ref #46850

Problem Summary:
See the issue.

What is changed and how it works?

A new RPC named "DenyImprotRpcs" has been added to TiKV, which allows us deny importing during backing up.

Check List

Tests

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

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: hillium <yujuncen@pingcap.com>
Signed-off-by: hillium <yujuncen@pingcap.com>
@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 15, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 15, 2023
@tiprow
Copy link

tiprow bot commented Sep 15, 2023

Hi @YuJuncen. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Signed-off-by: hillium <yujuncen@pingcap.com>
…ghtning

Signed-off-by: hillium <yujuncen@pingcap.com>
@YuJuncen YuJuncen marked this pull request as ready for review September 19, 2023 06:56
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 19, 2023
Signed-off-by: hillium <yujuncen@pingcap.com>
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 19, 2023
br/pkg/task/backup_ebs.go Outdated Show resolved Hide resolved
ctx.ReadyL("pause_lightning")
ctx.runGrp.Go(func() error {
err := denyLightning.Keeper(ctx, ctx.cfg.TTL)
if errors.Cause(err) != context.Canceled {
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the value to record a log entry here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So we can know what happened to TiKV for troubleshooting.

@BornChanger
Copy link
Contributor

/retest

@tiprow
Copy link

tiprow bot commented Sep 20, 2023

@BornChanger: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@YuJuncen
Copy link
Contributor Author

@BornChanger Well I guess our CI cannot pass as long as we have replaced the kvproto to our own repo... 😢

Signed-off-by: hillium <yujuncen@pingcap.com>
Signed-off-by: hillium <yujuncen@pingcap.com>
Signed-off-by: hillium <yujuncen@pingcap.com>
Signed-off-by: hillium <yujuncen@pingcap.com>
@YuJuncen
Copy link
Contributor Author

/test all

@tiprow
Copy link

tiprow bot commented Sep 22, 2023

@YuJuncen: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test all

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@YuJuncen
Copy link
Contributor Author

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Sep 22, 2023
…ghtning

Signed-off-by: hillium <yujuncen@pingcap.com>
Signed-off-by: hillium <yujuncen@pingcap.com>
GetDenyLightningClient(ctx context.Context, storeID uint64) (SuspendLightningClient, error)
}

type SuspendLightningClient interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

SuspendLightningClient is not proper because it's not suspend lightning only. also include br restore. so it's better to be SuspendImportingClient or SuspendIngestClient

Signed-off-by: hillium <yujuncen@pingcap.com>
Signed-off-by: hillium <yujuncen@pingcap.com>
Copy link
Contributor

@BornChanger BornChanger left a comment

Choose a reason for hiding this comment

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

Again, please refresh the title and pr description. Others lgtm.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Sep 27, 2023
@BornChanger
Copy link
Contributor

/test tiprow_fast_test

@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 27, 2023

@BornChanger: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build
  • /test canary-scan-security
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-br-integration-test
  • /test pull-common-test
  • /test pull-e2e-test
  • /test pull-integration-common-test
  • /test pull-integration-copr-test
  • /test pull-integration-ddl-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test pull-integration-prisma-test
  • /test pull-mysql-client-test
  • /test pull-sqllogic-test
  • /test pull-tiflash-test
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test pull-notify-when-compatibility-sections-changed

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test

In response to this:

/test tiprow_fast_test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@BornChanger
Copy link
Contributor

/ok-to-test

1 similar comment
@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, BornChanger

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 27, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 27, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-09-27 11:48:56.594595468 +0000 UTC m=+16134.181705613: ☑️ agreed by BornChanger.
  • 2023-09-27 13:43:29.618978961 +0000 UTC m=+23007.206089092: ☑️ agreed by 3pointer.

@ti-chi-bot ti-chi-bot bot merged commit 32540a4 into pingcap:master Sep 27, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #47341.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Sep 27, 2023
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #47342.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Sep 27, 2023
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot bot pushed a commit that referenced this pull request Sep 28, 2023
BornChanger pushed a commit to BornChanger/tidb that referenced this pull request Sep 28, 2023
YuJuncen pushed a commit to YuJuncen/tidb that referenced this pull request Sep 29, 2023
ti-chi-bot bot pushed a commit that referenced this pull request Oct 16, 2023
guoshouyan pushed a commit to guoshouyan/tidb that referenced this pull request Mar 5, 2024
…napshot_backup (pingcap#47001) (pingcap#47341) (pingcap#20)

ref pingcap#46850

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants