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

br: lock the call of update stats meta #47610

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

Leavrth
Copy link
Contributor

@Leavrth Leavrth commented Oct 13, 2023

What problem does this PR solve?

Issue Number: ref #47596

Problem Summary:
the tidb session is not thread safe

What is changed and how it works?

add lock

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

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

None

Signed-off-by: Leavrth <jianjun.liao@outlook.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked labels Oct 13, 2023
@tiprow
Copy link

tiprow bot commented Oct 13, 2023

Hi @Leavrth. 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.

@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #47610 (0399cc2) into master (f4b287d) will increase coverage by 3.9492%.
Report is 21 commits behind head on master.
The diff coverage is 90.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #47610        +/-   ##
================================================
+ Coverage   71.8877%   75.8369%   +3.9492%     
================================================
  Files          1353       2555      +1202     
  Lines        401082     758345    +357263     
================================================
+ Hits         288329     575106    +286777     
- Misses        93295     146756     +53461     
- Partials      19458      36483     +17025     
Flag Coverage Δ
integration 46.5713% <90.0000%> (?)
unit 73.2934% <30.0000%> (+1.4056%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9913% <ø> (ø)
parser 84.7222% <ø> (-0.0106%) ⬇️
br 65.1061% <90.0000%> (+11.7570%) ⬆️

Signed-off-by: Leavrth <jianjun.liao@outlook.com>
@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 13, 2023
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 16, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 16, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 16, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-16 03:02:09.449014082 +0000 UTC m=+1626127.036124212: ☑️ agreed by YuJuncen.
  • 2023-10-16 03:02:17.889521368 +0000 UTC m=+1626135.476631508: ☑️ agreed by 3pointer.

@Leavrth
Copy link
Contributor Author

Leavrth commented Oct 16, 2023

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 16, 2023
@Leavrth
Copy link
Contributor Author

Leavrth commented Oct 16, 2023

/test pull-integration-test

@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 16, 2023

@Leavrth: 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-nodejs-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 pull-integration-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.

@Leavrth
Copy link
Contributor Author

Leavrth commented Oct 16, 2023

/test pull-br-integration-test

@Leavrth Leavrth removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 16, 2023
@tiprow
Copy link

tiprow bot commented Oct 16, 2023

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

In response to this:

/test pull-integration-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.

@Leavrth
Copy link
Contributor Author

Leavrth commented Oct 16, 2023

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 16, 2023
@tiprow
Copy link

tiprow bot commented Oct 16, 2023

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

In response to this:

/test pull-br-integration-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.

@Leavrth
Copy link
Contributor Author

Leavrth commented Oct 16, 2023

/retest

@tiprow
Copy link

tiprow bot commented Oct 16, 2023

@Leavrth: 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.

@Leavrth Leavrth removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 16, 2023
@Leavrth
Copy link
Contributor Author

Leavrth commented Oct 16, 2023

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Oct 16, 2023
@ti-chi-bot ti-chi-bot bot merged commit 476d9b3 into pingcap:master Oct 16, 2023
15 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants