domain: load system keyspace info schema#61939
Conversation
|
Hi @D3Hunter. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #61939 +/- ##
================================================
+ Coverage 72.9940% 75.0061% +2.0121%
================================================
Files 1735 1781 +46
Lines 482030 493009 +10979
================================================
+ Hits 351853 369787 +17934
+ Misses 108602 100257 -8345
- Partials 21575 22965 +1390
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
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-sigs/prow repository. |
| se, err := createSession(store) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| err = se.sessionVars.SetSystemVar(vardef.AutoCommit, "1") | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| err = se.sessionVars.SetSystemVar(vardef.MaxExecutionTime, "0") | ||
| if err != nil { | ||
| return nil, errors.Trace(err) | ||
| } | ||
| err = se.sessionVars.SetSystemVar(vardef.MaxAllowedPacket, strconv.FormatUint(vardef.DefMaxAllowedPacket, 10)) | ||
| if err != nil { | ||
| return nil, errors.Trace(err) | ||
| } | ||
| err = se.sessionVars.SetSystemVar(vardef.TiDBConstraintCheckInPlacePessimistic, vardef.On) | ||
| if err != nil { | ||
| return nil, errors.Trace(err) | ||
| } | ||
| se.sessionVars.CommonGlobalLoaded = true | ||
| se.sessionVars.InRestrictedSQL = true | ||
| // Internal session uses default format to prevent memory leak problem. | ||
| se.sessionVars.EnableChunkRPC = false | ||
| return se, nil |
There was a problem hiding this comment.
reuse what's in createSessionWithDomainFunc
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: GMHDBJD, hawkingrei, tangenta The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
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-sigs/prow repository. |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
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-sigs/prow repository. |
What problem does this PR solve?
Issue Number: ref #61702
Problem Summary:
What changed and how does it work?
Domaininside cross keyspace session, add some nilness check inside the usage of DomainDomainin session as session level fields, such asInfoSchema,SchemaValidatorandAutoIDRequirementDomainof the cross keyspace session isnil, as those sessions shouldn't access resources of current keyspace, to avoid it mix things up with user keyspace session and cause correct issues.Domain, if there are any other path we hasn't changed, let it panic, so we can know it early. we will sort out all other access point to Domain instance later to evaluate whether it's needed to changeCheck List
Tests
as we don't have place to start 2 instance for SYSTEM and user KS, it's tested manually
apply below diff, and then start SYSTEM KS of nextgen, then start ks1 and ks2
the
target=XXXmeans where the task is created, we can see ks1 and ks2 are using different id range for SYSTEM KS, and different with that of the current keyspaceon ks1 KS
on ks2
diff
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.