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

planner: fix DATA RACE caused by TestDropBindBySQLDigest #49164

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Dec 5, 2023

What problem does this PR solve?

Issue Number: close #49113

Problem Summary: planner: fix DATA RACE caused by TestDropBindBySQLDigest

What changed and how does it work?

planner: fix DATA RACE caused by TestDropBindBySQLDigest

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

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed 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. labels Dec 5, 2023
Copy link

tiprow bot commented Dec 5, 2023

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

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. and removed do-not-merge/needs-triage-completed labels Dec 5, 2023
Copy link

codecov bot commented Dec 5, 2023

Codecov Report

Merging #49164 (81e8290) into master (0fd779c) will increase coverage by 1.0255%.
Report is 7 commits behind head on master.
The diff coverage is 100.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #49164        +/-   ##
================================================
+ Coverage   71.0445%   72.0701%   +1.0255%     
================================================
  Files          1368       1405        +37     
  Lines        402957     414019     +11062     
================================================
+ Hits         286279     298384     +12105     
- Misses        96737      96800        +63     
+ Partials      19941      18835      -1106     
Flag Coverage Δ
integration 43.6368% <100.0000%> (?)
unit 71.0442% <ø> (-0.0003%) ⬇️

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

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 48.3829% <ø> (-4.5858%) ⬇️

@qw4990
Copy link
Contributor Author

qw4990 commented Dec 5, 2023

/test unit-test

Copy link

tiprow bot commented Dec 5, 2023

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

In response to this:

/test unit-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.

Comment on lines 135 to 136
// No need to acquire the session context lock for ExecRestrictedSQL, it
// uses another background session.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove this comment?

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 affect the performance of high concurrent queries?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tangenta I removed the stale comment.

@fixdb No, this lock is only used by background jobs related to bindings. Normal queries won't be affected by this lock.

@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Dec 5, 2023
@hawkingrei
Copy link
Member

This bugfix may have a problem.

Copy link
Contributor

@elsa0520 elsa0520 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Dec 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: elsa0520, hawkingrei

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 Dec 5, 2023
Copy link

ti-chi-bot bot commented Dec 5, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-12-05 02:24:43.639421921 +0000 UTC m=+1494312.304648102: ☑️ agreed by hawkingrei.
  • 2023-12-05 03:49:53.593712568 +0000 UTC m=+1499422.258938764: ☑️ agreed by elsa0520.

@hawkingrei
Copy link
Member

/retest

@qw4990
Copy link
Contributor Author

qw4990 commented Dec 5, 2023

/test unit-test

Copy link

tiprow bot commented Dec 5, 2023

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

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test unit-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.

@ti-chi-bot ti-chi-bot bot merged commit 555048b into pingcap:master Dec 5, 2023
16 checks passed
@qw4990 qw4990 added the type/bugfix This PR fixes a bug. label Mar 16, 2024
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/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DATA RACE in the session.(*session).useCurrentSession()
5 participants