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

*: avoid concurrently using the session in the syncload #52830

Merged
merged 3 commits into from
Apr 23, 2024

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Apr 23, 2024

What problem does this PR solve?

Issue Number: close #52827

Problem Summary:

What changed and how does it work?

when singleflight meets timeout, some goroutines will concurrently use reuse session. we should keep everyone using independent sessions.

Check List

Tests

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

run it in the HA, It can pass test.

  • 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: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked 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. sig/planner SIG: Planner and removed do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked labels Apr 23, 2024
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@hawkingrei
Copy link
Member Author

/retest

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Merging #52830 (aa45b61) into master (4354682) will increase coverage by 3.3483%.
Report is 7 commits behind head on master.
The diff coverage is 75.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #52830        +/-   ##
================================================
+ Coverage   72.3201%   75.6685%   +3.3483%     
================================================
  Files          1474       1478         +4     
  Lines        427611     432436      +4825     
================================================
+ Hits         309249     327218     +17969     
+ Misses        99057      85068     -13989     
- Partials      19305      20150       +845     
Flag Coverage Δ
integration 51.0581% <75.0000%> (?)
unit 71.7210% <75.0000%> (+0.5331%) ⬆️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 60.8342% <ø> (+19.6954%) ⬆️

task1.Retry = 0
for i := 0; i < syncload.RetryCount*5; i++ {
task1, err1 = h.HandleOneTask(testKit.Session().(sessionctx.Context), task1, exitCh)
require.Error(t, err1)
Copy link
Contributor

Choose a reason for hiding this comment

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

assert the err1 msg

Copy link
Member Author

Choose a reason for hiding this comment

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

It failpoints a panic in the program. so HandleOneTask can quickly exit and create many goroutine in the tests.

Copy link

ti-chi-bot bot commented Apr 23, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-23 04:37:11.429192843 +0000 UTC m=+62188.169095755: ☑️ agreed by lcwangchao.
  • 2024-04-23 07:04:06.532385681 +0000 UTC m=+71003.272288593: ☑️ agreed by AilinKid.

@hawkingrei
Copy link
Member Author

/hold

wait for test result from QA.

@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 Apr 23, 2024
@hawkingrei hawkingrei requested a review from winoros April 23, 2024 08:36
Copy link

ti-chi-bot bot commented Apr 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, lcwangchao, winoros

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

@hawkingrei
Copy link
Member Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 23, 2024
@hawkingrei
Copy link
Member Author

/hold

wait for test result from QA.

image

@hawkingrei
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 8629068 into pingcap:master Apr 23, 2024
22 of 23 checks passed
@hawkingrei
Copy link
Member Author

/cherrypick release-8.1
/cherrypick release-7.5

@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-7.5: #52849.

In response to this:

/cherrypick release-8.1
/cherrypick release-7.5

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 ti-community-infra/tichi repository.

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

@hawkingrei: new pull request created to branch release-8.1: #52850.

In response to this:

/cherrypick release-8.1
/cherrypick release-7.5

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 ti-community-infra/tichi repository.

@hawkingrei
Copy link
Member Author

/cherrypick release-7.5

@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-7.5: #53331.

In response to this:

/cherrypick release-7.5

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 ti-community-infra/tichi repository.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request May 16, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
hawkingrei added a commit to ti-chi-bot/tidb that referenced this pull request May 16, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@hawkingrei
Copy link
Member Author

/cherrypick release-7.1

@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-7.1: #56099.

In response to this:

/cherrypick release-7.1

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 ti-community-infra/tichi repository.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Sep 16, 2024
Signed-off-by: ti-chi-bot <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 release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner 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.

tidb restart due to “handleOneItemTask panicked” after lightning finished
5 participants