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

*: cleanup sysvar API usage #36640

Merged
merged 18 commits into from
Aug 1, 2022
Merged

Conversation

morgo
Copy link
Contributor

@morgo morgo commented Jul 28, 2022

What problem does this PR solve?

Issue Number: close #36639

Problem Summary:

Currently, the sysvar API has some confusing usage. This simplifies/unifies the exported API.

What is changed and how it works?

See #36639 for an explanation.

Unfortunately because of backward compatibility, SetSystemVar is split into SetSystemVar (with validation) + SetSystemVarWithoutValidation. This will need to be cleaned up in a future PR (this change is already large enough).

Check List

Tests

  • Unit test
    Covered by existing tests, which are fixed here.
  • 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
    Internal API change, not suitable for cherry pick.

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.

The internal system variable API has been refactored and improved. This is a function neutral change.

@morgo morgo requested a review from a team as a code owner July 28, 2022 01:11
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jul 28, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • CbcWestwolf
  • tangenta

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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 28, 2022
@morgo
Copy link
Contributor Author

morgo commented Jul 28, 2022

This incorporates the previous PR #35088 - since it is required to be fixed.

@sre-bot
Copy link
Contributor

sre-bot commented Jul 28, 2022

@morgo
Copy link
Contributor Author

morgo commented Jul 28, 2022

/run-check_dev_2

@morgo morgo requested review from bb7133 and CbcWestwolf July 28, 2022 02:41
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 28, 2022
@hawkingrei hawkingrei requested a review from qw4990 July 28, 2022 05:02
@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 Jul 28, 2022
@ti-chi-bot
Copy link
Member

@CbcWestwolf: /merge is only allowed for the committers, you can assign this pull request to the committer in list by filling /assign @committer in the comment to help merge this pull request.

In response to this:

/merge

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.

@ngaut
Copy link
Member

ngaut commented Jul 30, 2022

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 9fe19ec

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 30, 2022
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 1, 2022
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Aug 1, 2022
* upstream/master:
  ddl/schematracker: fix SetDDL will cause data race (pingcap#36768)
  planner: check virtual column for tiflash (pingcap#36771)
  *: replace defer clean with t.Cleanup (pingcap#36722)
  ddl: fix inaccurate row_count for `admin show ddl jobs` (pingcap#36716)
  config, sysvar: add config `instance.enable_ddl` and sysvar `tidb_enable_ddl` (pingcap#35425)
  *: enable part revive for all code (pingcap#36703)
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 1, 2022
@morgo
Copy link
Contributor Author

morgo commented Aug 1, 2022

/run-check_dev_2
/run-mysql-test

@morgo
Copy link
Contributor Author

morgo commented Aug 1, 2022

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 7eec4f8

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 1, 2022
@ti-chi-bot ti-chi-bot merged commit 0b1d3e0 into pingcap:master Aug 1, 2022
@morgo morgo deleted the sysvar-api-cleanup branch August 2, 2022 00:04
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. size/XXL Denotes a PR that changes 1000+ 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.

Cleanup Sysvar API functions