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

sysvar: bypass validation for noop variables #31566

Merged
merged 11 commits into from
Jan 11, 2022
Merged

Conversation

xhebox
Copy link
Contributor

@xhebox xhebox commented Jan 11, 2022

What problem does this PR solve?

Issue Number: close #31538

Problem Summary: This is a quick dirty workaround for the issue. It should not change much since affected variables are all no-op. We could fix it more smoothly by versioned sysvars or whatever in the future.

What is changed and 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

Remove validation for noop variables like `rpl_semi_sync_master_wait_point` in case it is an empty string to workaround upgrading

Signed-off-by: xhe <xw897002528@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 11, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bb7133
  • djshow832

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.

@xhebox xhebox requested a review from a team as a code owner January 11, 2022 09:24
@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/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 11, 2022
@xhebox xhebox requested review from bb7133 and wjhuang2016 January 11, 2022 09:27
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Copy link
Member

@bb7133 bb7133 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 the status/LGT1 Indicates that a PR has LGTM 1. label Jan 11, 2022
@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 Jan 11, 2022
@djshow832
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: c047fe6

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 11, 2022
@xhebox xhebox added the needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. label Jan 11, 2022
@djshow832
Copy link
Contributor

[2022-01-11T10:58:29.093Z]     integration_serial_test.go:3854: 

[2022-01-11T10:58:29.093Z]         	Error Trace:	integration_serial_test.go:3854

[2022-01-11T10:58:29.093Z]         	Error:      	An error is expected but got nil.

[2022-01-11T10:58:29.093Z]         	Test:       	TestSetVariables

[2022-01-11T10:58:29.093Z] 

[2022-01-11T10:58:29.093Z] === FAIL: sessionctx/variable TestValidate/delay_key_write#03 (0.00s)

[2022-01-11T10:58:29.093Z]     varsutil_test.go:602: 

[2022-01-11T10:58:29.093Z]         	Error Trace:	varsutil_test.go:602

[2022-01-11T10:58:29.093Z]         	Error:      	An error is expected but got nil.

[2022-01-11T10:58:29.093Z]         	Test:       	TestValidate/delay_key_write#03

[2022-01-11T10:58:29.093Z]         	Messages:   	{delay_key_write 3 true} got err=<nil>

[2022-01-11T10:58:29.093Z]     --- FAIL: TestValidate/delay_key_write#03 (0.00s)

[2022-01-11T10:58:29.093Z] 

[2022-01-11T10:58:29.093Z] === FAIL: sessionctx/variable TestValidate/session_track_gtids#03 (0.00s)

[2022-01-11T10:58:29.093Z]     varsutil_test.go:602: 

[2022-01-11T10:58:29.093Z]         	Error Trace:	varsutil_test.go:602

[2022-01-11T10:58:29.093Z]         	Error:      	An error is expected but got nil.

[2022-01-11T10:58:29.093Z]         	Test:       	TestValidate/session_track_gtids#03

[2022-01-11T10:58:29.093Z]         	Messages:   	{session_track_gtids ON true} got err=<nil>

[2022-01-11T10:58:29.093Z]     --- FAIL: TestValidate/session_track_gtids#03 (0.00s)

[2022-01-11T10:58:29.093Z] 

[2022-01-11T10:58:29.093Z] === FAIL: sessionctx/variable TestValidate/query_cache_type#03 (0.00s)

[2022-01-11T10:58:29.093Z]     varsutil_test.go:602: 

[2022-01-11T10:58:29.093Z]         	Error Trace:	varsutil_test.go:602

[2022-01-11T10:58:29.093Z]         	Error:      	An error is expected but got nil.

[2022-01-11T10:58:29.093Z]         	Test:       	TestValidate/query_cache_type#03

[2022-01-11T10:58:29.093Z]         	Messages:   	{query_cache_type 3 true} got err=<nil>

[2022-01-11T10:58:29.093Z]     --- FAIL: TestValidate/query_cache_type#03 (0.00s)

[2022-01-11T10:58:29.093Z] 

[2022-01-11T10:58:29.093Z] === FAIL: sessionctx/variable TestValidate (0.00s)

@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Jan 11, 2022
@djshow832
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 2a06219

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 11, 2022
ti-chi-bot and others added 2 commits January 11, 2022 19:28
Signed-off-by: xhe <xw897002528@gmail.com>
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Jan 11, 2022
@xhebox
Copy link
Contributor Author

xhebox commented Jan 11, 2022

Fixed a test case
/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 0169dd9

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 11, 2022
Signed-off-by: xhe <xw897002528@gmail.com>
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Jan 11, 2022
@xhebox
Copy link
Contributor Author

xhebox commented Jan 11, 2022

Fix on fix...

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 8cfddb5

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 11, 2022
@sre-bot
Copy link
Contributor

sre-bot commented Jan 11, 2022

@bb7133
Copy link
Member

bb7133 commented Jan 11, 2022

/run-check_dev_2
/run-unit-test

@xhebox
Copy link
Contributor Author

xhebox commented Jan 11, 2022

/run-unit-test

@xhebox
Copy link
Contributor Author

xhebox commented Jan 11, 2022

/run-unit-test

@xhebox
Copy link
Contributor Author

xhebox commented Jan 11, 2022

/run-check_dev_2

@xhebox
Copy link
Contributor Author

xhebox commented Jan 11, 2022

/run-unit-test

@ti-chi-bot ti-chi-bot merged commit 1ffd6c0 into pingcap:master Jan 11, 2022
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Jan 11, 2022
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-5.4 in PR #31581

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 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
6 participants