session: add no register API for using TiDB as a library#18587
Merged
zimulala merged 3 commits intopingcap:release-4.0from Jul 15, 2020
Merged
session: add no register API for using TiDB as a library#18587zimulala merged 3 commits intopingcap:release-4.0from
zimulala merged 3 commits intopingcap:release-4.0from
Conversation
* domain,session: add NoRegister entry * session: run fmt * session: remove old NoRegister API * config: add no register config * config: add example to example config file. * session: remove unused type * *: rename NoRegister to SkipRegisterToDashboard Co-authored-by: crazycs <crazycs520@gmail.com>
Contributor
|
No release note, Please follow https://github.com/pingcap/community/blob/master/contributors/release-note-checker.md |
ti-srebot
approved these changes
Jul 15, 2020
Contributor
|
/run-all-tests |
Contributor
|
/run-all-tests |
Contributor
|
@YuJuncen merge failed. |
Contributor
Author
|
/run-unit-test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cherry-pick #17513
What problem does this PR solve?
Issue Number: close br#299
Problem Summary:
BR uses TiDB as a library, but currently when we call
session.GetDomain,domap.Getwill automatically register itself to PD. Then a strange TiDB will present at dashboard.see more at br#299.
What is changed and how it works?
What's Changed:
I added a config option
no-registerto TiDB.Then, when this is enabled,
topologySyncerwon't be started, hence this TiDB won't register itself to dashboard.How it Works:
We add a if-guard to where initializing
topologySynceratinfoSyncer.InitandSession.Init.Check List
Tests
no-register = true, then BR won't register it self as a TiDB anymore.More things
Maybe we have more things to do, for now please add
WIPtag for this:Add test cases.(IMO, this is too hard to be tested automatically.)Don't make(We can setNoRegistered TiDB become DDL owner.run-DDL = false)Release note