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

server: refactor session and sessiontxn #41122

Closed

Conversation

cfzjywxk
Copy link
Contributor

@cfzjywxk cfzjywxk commented Feb 7, 2023

What problem does this PR solve?

Issue Number: ref #41098

Problem Summary:

Refactor and unify the session and transaction interfaces and usages.

What is changed and how it works?

  1. Move the LazyTxn struct from session to txnManager. LazyTxn is a wrapper to use KV.Transaction utilities for session, it should be refactored and merged into txnManager in the future, so the session has a unified entry the TxnManager interface to communicate with the transaction engine or module.
  2. Unify the OnStmtStart and OnStmtEnd from txnManager and LazyTxn into one.
  3. Record the Valid state in TxnInfo for the session manager.
  4. Move the lock-view related Txninfo from the session package to the sessiontxn package.

Check List

Tests

  • Unit test

Side effects

Documentation

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@cfzjywxk cfzjywxk added type/enhancement The issue or PR belongs to an enhancement. component/server sig/transaction SIG:Transaction labels Feb 7, 2023
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

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.

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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 7, 2023
@cfzjywxk cfzjywxk force-pushed the refactor_session_sessiontxn branch 2 times, most recently from a56f492 to e32f609 Compare February 7, 2023 05:51
@cfzjywxk
Copy link
Contributor Author

cfzjywxk commented Feb 7, 2023

/retest-required

@cfzjywxk cfzjywxk force-pushed the refactor_session_sessiontxn branch 3 times, most recently from 63e1dad to ee8c74c Compare February 7, 2023 13:25
@cfzjywxk
Copy link
Contributor Author

cfzjywxk commented Feb 7, 2023

/retest

@cfzjywxk cfzjywxk force-pushed the refactor_session_sessiontxn branch from ee8c74c to 953eb41 Compare February 7, 2023 14:18
@ti-chi-bot
Copy link
Member

@cfzjywxk: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/unit-test ee8c74c86b986b0d982bd020da12a36114b537fe link true /test unit-test
idc-jenkins-ci-tidb/check_dev_2 953eb41 link true /test check-dev2

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

@cfzjywxk cfzjywxk closed this Feb 7, 2023
@cfzjywxk cfzjywxk mentioned this pull request Mar 3, 2023
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/server release-note-none Denotes a PR that doesn't merit a release note. sig/transaction SIG:Transaction size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants