Skip to content

ddl: fix ttlManager leak in TestWriteReorgForColumnTypeChangeOnAmendTxn#27047

Merged
ti-chi-bot merged 3 commits intopingcap:masterfrom
sticnarf:ttl-leak
Aug 10, 2021
Merged

ddl: fix ttlManager leak in TestWriteReorgForColumnTypeChangeOnAmendTxn#27047
ti-chi-bot merged 3 commits intopingcap:masterfrom
sticnarf:ttl-leak

Conversation

@sticnarf
Copy link
Contributor

@sticnarf sticnarf commented Aug 10, 2021

What problem does this PR solve?

Issue Number: close #26997

What is changed and how it works?

TestWriteReorgForColumnTypeChangeOnAmendTxn begins an explicit pessimistic transaction and locks some keys. But it does not close the session at the end of the test. So the ttlManager keeps updating TTL for the transaction, leading to a goroutine leak.

This PR closes the session at the end of the test.

Check List

Tests

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

Release note

None

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
@sticnarf sticnarf added sig/transaction SIG:Transaction sig/sql-infra SIG: SQL Infra labels Aug 10, 2021
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 10, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • AilinKid
  • youjiali1995

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Details

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added 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 Aug 10, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 10, 2021
@sticnarf
Copy link
Contributor Author

CI fails due to #26947

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 10, 2021
@youjiali1995
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: 405b9e3

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 10, 2021
@ti-chi-bot ti-chi-bot merged commit 06dd0da into pingcap:master Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesn't merit a release note. sig/sql-infra SIG: SQL Infra sig/transaction SIG:Transaction size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Leak in client-go/v2/txnkv/transaction.keepAlive

4 participants