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

lightning: mark background and resource group name when in local mode #44950

Merged
merged 21 commits into from
Jul 28, 2023

Conversation

HuSharp
Copy link
Contributor

@HuSharp HuSharp commented Jun 26, 2023

Signed-off-by: husharp jinhao.hu@pingcap.com

What problem does this PR solve?

Issue Number: ref #44517
wait for tikv/client-go#872 merged.

Problem Summary:

What is changed and how it works?

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Release note

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

None

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 26, 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 release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 26, 2023
@tiprow
Copy link

tiprow bot commented Jun 26, 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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 26, 2023
@HuSharp HuSharp force-pushed the lightning_bind_resource_group branch from 83990ad to 5b4d006 Compare June 30, 2023 08:51
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 30, 2023
@HuSharp HuSharp force-pushed the lightning_bind_resource_group branch 4 times, most recently from 65c75b2 to 48532a6 Compare July 3, 2023 07:59
@HuSharp HuSharp marked this pull request as ready for review July 3, 2023 08:14
@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 Jul 3, 2023
@ti-chi-bot ti-chi-bot bot deleted a comment from ti-chi-bot Jul 3, 2023
@HuSharp HuSharp force-pushed the lightning_bind_resource_group branch from 48532a6 to c9f2cc0 Compare July 3, 2023 08:27
@ti-chi-bot ti-chi-bot bot deleted a comment from ti-chi-bot Jul 3, 2023
@HuSharp
Copy link
Contributor Author

HuSharp commented Jul 3, 2023

@glorv @nolouch PTAL, thx!

Copy link
Contributor

@glorv glorv left a comment

Choose a reason for hiding this comment

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

The resource-group part LGTM. Should also add resource-group-tag so tikv can identify the task type. /cc @nolouch @lance6716

br/pkg/lightning/importer/import.go Outdated Show resolved Hide resolved
br/cmd/tidb-lightning-ctl/main.go Outdated Show resolved Hide resolved
@glorv glorv requested review from lance6716 and nolouch July 3, 2023 09:13
br/pkg/lightning/importer/import.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
@HuSharp HuSharp force-pushed the lightning_bind_resource_group branch from c9f2cc0 to fc3e0bc Compare July 4, 2023 09:01
@HuSharp HuSharp requested a review from a team as a code owner July 4, 2023 09:01
@ti-chi-bot ti-chi-bot bot deleted a comment from ti-chi-bot Jul 4, 2023
@ti-chi-bot ti-chi-bot bot deleted a comment from ti-chi-bot Jul 4, 2023
@HuSharp
Copy link
Contributor Author

HuSharp commented Jul 26, 2023

/retest-required

1 similar comment
@HuSharp
Copy link
Contributor Author

HuSharp commented Jul 27, 2023

/retest-required

@glorv
Copy link
Contributor

glorv commented Jul 27, 2023

/retest

@HuSharp
Copy link
Contributor Author

HuSharp commented Jul 27, 2023

/retest-required

@glorv
Copy link
Contributor

glorv commented Jul 27, 2023

@lance6716 @nolouch PTAL again, thanks

Copy link
Contributor

@lance6716 lance6716 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

@@ -60,7 +60,13 @@ func NewChecksumManager(ctx context.Context, rc *Controller, store kv.Storage) (
log.FromContext(ctx).Info("set tidb_backoff_weight to default", zap.Int("backoff_weight", local.DefaultBackoffWeight))
backoffWeight = local.DefaultBackoffWeight
}
manager = local.NewTiKVChecksumManager(store.GetClient(), pdCli, uint(rc.cfg.TiDB.DistSQLScanConcurrency), backoffWeight)

explicitRequestSourceType, err := common.GetExplicitRequestSourceTypeFromDB(ctx, rc.db)
Copy link
Contributor

Choose a reason for hiding this comment

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

Will it fail when the target cluster is lower version? Is this by design?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • Querying a lower version of tidb only returns empty results.
  • When getting empty results, it will be the same as the default setting.

br/pkg/lightning/importer/import.go Outdated Show resolved Hide resolved
@@ -121,7 +121,7 @@ func createLocalBackend(ctx context.Context, cfg *Config) (*local.Backend, error
regionSizeGetter := &local.TableRegionSizeGetterImpl{
DB: nil,
}
backendConfig := local.NewBackendConfig(cfg.Lightning, int(LitRLimit), cfg.KeyspaceName)
backendConfig := local.NewBackendConfig(cfg.Lightning, int(LitRLimit), cfg.KeyspaceName, "")
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe ask for a DDL developer to review the value

Copy link
Contributor

@glorv glorv Jul 27, 2023

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM~

Signed-off-by: husharp <jinhao.hu@pingcap.com>
@lance6716
Copy link
Contributor

lgtm

@HuSharp
Copy link
Contributor Author

HuSharp commented Jul 27, 2023

/retest-required

1 similar comment
@HuSharp
Copy link
Contributor Author

HuSharp commented Jul 27, 2023

/retest-required

@glorv glorv removed the request for review from a team July 28, 2023 02:58
@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 28, 2023
Signed-off-by: husharp <jinhao.hu@pingcap.com>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 28, 2023
Signed-off-by: husharp <jinhao.hu@pingcap.com>
@HuSharp HuSharp force-pushed the lightning_bind_resource_group branch from b6f06cd to 2ca33d8 Compare July 28, 2023 04:47
@HuSharp
Copy link
Contributor Author

HuSharp commented Jul 28, 2023

/retest-required

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 28, 2023

@HuSharp: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-br-integration-test 55cc1dc link true /test pull-br-integration-test

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@HuSharp
Copy link
Contributor Author

HuSharp commented Jul 28, 2023

/retest-required

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

ti-chi-bot bot commented Jul 28, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: glorv, tangenta

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
Copy link

ti-chi-bot bot commented Jul 28, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-07-26 05:04:04.283504413 +0000 UTC m=+330786.878035400: ☑️ agreed by glorv.
  • 2023-07-28 10:48:37.468365413 +0000 UTC m=+524260.062896400: ☑️ agreed by tangenta.

@ti-chi-bot ti-chi-bot bot merged commit f4f78a1 into pingcap:master Jul 28, 2023
10 of 13 checks passed
@HuSharp HuSharp deleted the lightning_bind_resource_group branch July 28, 2023 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants