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

*: support select for update of tables #27861

Merged
merged 2 commits into from
Oct 14, 2021
Merged

Conversation

jackysp
Copy link
Member

@jackysp jackysp commented Sep 7, 2021

Signed-off-by: Shuaipeng Yu [email protected]

What problem does this PR solve?

Issue Number: close #28689

Problem Summary:
For a multi-table join, a for update stmt locks all tables, some tables may only be read-only tables that participate in it.

What is changed and how it works?

Proposal: xxx

What's Changed:
Supports the of tables syntax, which specifies that only some of the tables are locked.

How it Works:

Check List

Tests

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

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

Support `of table list` clause for `select for update` statement.

@jackysp jackysp added the sig/transaction SIG:Transaction label Sep 7, 2021
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 7, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • cfzjywxk
  • coocood

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 Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 7, 2021
@jackysp jackysp requested review from cfzjywxk and coocood September 7, 2021 09:41
@jackysp
Copy link
Member Author

jackysp commented Sep 7, 2021

Merge pingcap/parser#1333 first.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 9, 2021
@ti-chi-bot ti-chi-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 15, 2021
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 29, 2021
@jackysp
Copy link
Member Author

jackysp commented Sep 29, 2021

PTAL @cfzjywxk @coocood

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 29, 2021
@cfzjywxk
Copy link
Contributor

@jackysp
As it will introduce a new feature, do we need to sync with the production manager for this change?

@jackysp
Copy link
Member Author

jackysp commented Sep 29, 2021

@jackysp As it will introduce a new feature, do we need to sync with the production manager for this change?

I am not familiar with the R&D process. But how are all the new features contributed by the community? @cfzjywxk

@cfzjywxk
Copy link
Contributor

@jackysp As it will introduce a new feature, do we need to sync with the production manager for this change?

I am not familiar with the R&D process. But how are all the new features contributed by the community? @cfzjywxk

@jackysp
Seems the behaviour and feature change needs to be approved by the product manager by now, let me check about it.

@cfzjywxk
Copy link
Contributor

@jackysp
Currently the R&D process is that extra change or contribution needs to be approved by @sunxiaoguang, after that this could be packed into the sprint6 release box.

@sunxiaoguang
Copy link
Contributor

sunxiaoguang commented Sep 29, 2021

Hi @jackysp , Thanks for your contribution.

As on going discussion on internals proposed. Despite the fact that we haven't decided with implementation mechanism, Community already reached agreement on always attaching issue to PR. So could you please create an issue to describe the feature you implemented and use #close xxx in PR message to link the issue and PR.

Thanks.

@tisonkun
Copy link
Contributor

tisonkun commented Sep 29, 2021

Hi @jackysp , Thanks for your contribution.

As on going discussion on (internals)[https://internals.tidb.io/t/topic/409/60] proposed. Despite the fact that we haven't decided with implementation mechanism, Community already reached agreement on always attaching issue to PR. So could you please create an issue to describe the feature you implemented and use #close xxx in PR message to link the issue and PR.

Thanks.

This's a good suggestion.

@jackysp I'd emphasize that it's not formalism, but we withdraw to the proposal phase that you will introduce a new feature with some motivation and background.

We have to reach a consensus on whether we want this feature and how we plan to implement it in the community by decision making involves other maintainers (you're one of maintainers) and committers. And later go into the implementation and test phase. Later released.

See more information on Make a Proposal.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 1, 2021
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 12, 2021
@jackysp
Copy link
Member Author

jackysp commented Oct 12, 2021

PTAL @cfzjywxk

Copy link
Contributor

@cfzjywxk cfzjywxk left a comment

Choose a reason for hiding this comment

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

LGTM

@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 Oct 14, 2021
@jackysp
Copy link
Member Author

jackysp commented Oct 14, 2021

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 9c2190c

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Oct 14, 2021
@ti-chi-bot
Copy link
Member

@jackysp: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-chi-bot merged commit a94150a into pingcap:master Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/transaction SIG:Transaction size/M Denotes a PR that changes 30-99 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.

Support SELECT FOR UPDATE OF TABLES
6 participants