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

*: use a unified session pool definition AMAP #55170

Merged
merged 5 commits into from
Aug 5, 2024

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Aug 2, 2024

What problem does this PR solve?

Issue Number: ref #54434.

What changed and how does it work?

Use a unified session pool definition as much as possible. This is to organize the code for later refactoring work.

Check List

Tests

  • Unit test
  • Integration test
  • 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 ti-chi-bot bot added 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. sig/planner SIG: Planner labels Aug 2, 2024
Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.3710%. Comparing base (f3e153a) to head (47eabc1).
Report is 3 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55170        +/-   ##
================================================
+ Coverage   74.8430%   75.3710%   +0.5279%     
================================================
  Files          1568       1569         +1     
  Lines        364503     439945     +75442     
================================================
+ Hits         272805     331591     +58786     
- Misses        71976      87725     +15749     
- Partials      19722      20629       +907     
Flag Coverage Δ
integration 50.5713% <81.1111%> (?)
unit 71.7181% <100.0000%> (-2.0255%) ⬇️

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

Components Coverage Δ
dumpling 52.9567% <ø> (-2.2327%) ⬇️
parser ∅ <ø> (∅)
br 63.0242% <ø> (+15.3235%) ⬆️

@JmPotato JmPotato force-pushed the refine_runaway_checker branch from aa604a7 to 0b87f6a Compare August 5, 2024 03:44
@JmPotato
Copy link
Member Author

JmPotato commented Aug 5, 2024

/cc @tangenta @hi-rustin

@ti-chi-bot ti-chi-bot bot requested review from Rustin170506 and tangenta August 5, 2024 03:58
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 5, 2024
Copy link
Member

@Rustin170506 Rustin170506 left a comment

Choose a reason for hiding this comment

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

some nits

"github.com/pingcap/tidb/pkg/util/chunk"
"github.com/pingcap/tidb/pkg/util/sqlexec"
"github.com/tikv/client-go/v2/util"
cliutil "github.com/tikv/client-go/v2/util"
Copy link
Member

Choose a reason for hiding this comment

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

cliutil seems quite confusing, because CLI usually represents Command Line Interface. Maybe we should use the full name or use clit.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to clit.

// Make sure the session is new.
sctx := se.(sessionctx.Context)
ctx := kv.WithInternalSourceType(context.Background(), kv.InternalTxnMeta)
if _, err := sctx.GetSQLExecutor().ExecuteInternal(ctx, "rollback"); err != nil {
se.Close()
Copy link
Member

Choose a reason for hiding this comment

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

May I ask why do we need to drop this line?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. It seems the behavior changed. I have reverted it. Please take a look.

@JmPotato JmPotato requested a review from Rustin170506 August 5, 2024 05:46
Copy link
Member

@Rustin170506 Rustin170506 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks! 👍

Copy link

ti-chi-bot bot commented Aug 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hi-rustin, 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 ti-chi-bot bot added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 5, 2024
Copy link

ti-chi-bot bot commented Aug 5, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-05 04:33:10.050494922 +0000 UTC m=+240119.917594009: ☑️ agreed by tangenta.
  • 2024-08-05 05:55:05.261119986 +0000 UTC m=+245035.128219077: ☑️ agreed by hi-rustin.

@JmPotato JmPotato force-pushed the refine_runaway_checker branch from 226ce9f to 47eabc1 Compare August 5, 2024 07:09
@JmPotato
Copy link
Member Author

JmPotato commented Aug 5, 2024

/retest

Copy link

tiprow bot commented Aug 5, 2024

@JmPotato: 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
fast_test_tiprow 47eabc1 link true /test fast_test_tiprow

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

@ti-chi-bot ti-chi-bot bot merged commit 5aad7df into pingcap:master Aug 5, 2024
23 of 24 checks passed
@JmPotato JmPotato deleted the refine_runaway_checker branch August 5, 2024 14:26
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/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.

3 participants