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

session, ddl: fix the nil point in TxnInfo #44486

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

zimulala
Copy link
Contributor

@zimulala zimulala commented Jun 7, 2023

What problem does this PR solve?

Issue Number: close #43829

Problem Summary:

processInfo := s.ShowProcess()
txnInfo.ConnectionID = processInfo.ID   // panic is this line.

What is changed and how it works?

  • Check if the processInfo is nil.
  • Delete the duplicate logic of getting processInfoID.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code
    Hard to test. In UT we use the MockSessionManager, so can't to test it.

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 release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 7, 2023
@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. and removed do-not-merge/needs-triage-completed labels Jun 7, 2023
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jun 8, 2023
@ti-chi-bot ti-chi-bot bot added the lgtm label Jun 8, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 8, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lcwangchao, tiancaiamao

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:
  • OWNERS [lcwangchao,tiancaiamao]

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 8, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 8, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-06-08 02:48:38.327205049 +0000 UTC m=+145610.171839647: ☑️ agreed by lcwangchao.
  • 2023-06-08 03:10:44.286795489 +0000 UTC m=+146936.131430088: ☑️ agreed by tiancaiamao.

@tiancaiamao
Copy link
Contributor

/merge

@zimulala
Copy link
Contributor Author

zimulala commented Jun 8, 2023

/retest

@ti-chi-bot ti-chi-bot bot merged commit 3c50d51 into pingcap:master Jun 8, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-5.4: #44505.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 8, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.1: #44506.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #44507.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #44508.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-5.3: #44509.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 8, 2023
@zimulala zimulala deleted the zimuxia/txn-info branch June 8, 2023 06:04
ti-chi-bot bot pushed a commit that referenced this pull request Jun 30, 2023
ti-chi-bot bot pushed a commit that referenced this pull request Jul 10, 2023
ti-chi-bot bot pushed a commit that referenced this pull request Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nil point panic in session.session#TxnInfo() method.
4 participants