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

ddl: init global vars from system tables before start domain #54913

Merged
merged 8 commits into from
Jul 29, 2024

Conversation

D3Hunter
Copy link
Contributor

@D3Hunter D3Hunter commented Jul 25, 2024

What problem does this PR solve?

Issue Number: close #54868, close #54860

Problem Summary:

What changed and how does it work?

as title, see this for root cause #54868 (comment)

Check List

Tests

  • Unit test, only fix existing ones, should cover it
  • Integration test
  • Manual test (add detailed scripts or steps below)

bootstrap with TiKV, test some ddl/dml, they should work and check no error logs.
bootstrap with unistore, same test as above.

  • No need to test
    • I checked and no code files have been changed.

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

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 25, 2024
Copy link

tiprow bot commented Jul 25, 2024

Hi @D3Hunter. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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.

@D3Hunter D3Hunter changed the title ddl: init global vars from system tables before start domain [WIP]ddl: init global vars from system tables before start domain Jul 26, 2024
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 26, 2024
Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 75.60976% with 10 lines in your changes missing coverage. Please review.

Project coverage is 74.8315%. Comparing base (ee64347) to head (0006970).
Report is 23 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #54913        +/-   ##
================================================
+ Coverage   72.6924%   74.8315%   +2.1390%     
================================================
  Files          1557       1565         +8     
  Lines        438381     446555      +8174     
================================================
+ Hits         318670     334164     +15494     
+ Misses       100054      92119      -7935     
- Partials      19657      20272       +615     
Flag Coverage Δ
integration 48.9470% <75.6097%> (?)
unit 72.0276% <65.8536%> (+0.3426%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9567% <ø> (-0.0089%) ⬇️
parser ∅ <ø> (∅)
br 52.2433% <ø> (+6.3524%) ⬆️

@D3Hunter
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jul 26, 2024

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@D3Hunter
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jul 26, 2024

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@D3Hunter
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jul 26, 2024

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@D3Hunter
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jul 26, 2024

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@D3Hunter
Copy link
Contributor Author

/retest

@D3Hunter D3Hunter changed the title [WIP]ddl: init global vars from system tables before start domain ddl: init global vars from system tables before start domain Jul 29, 2024
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 29, 2024
Copy link

tiprow bot commented Jul 29, 2024

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

Copy link
Collaborator

@lcwangchao lcwangchao left a comment

Choose a reason for hiding this comment

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

Could you also fix the print message here?

intest.Assert(ctxLocStr == varsLocStr && ctxLocStr == stmtLocStr,
"location mismatch, ctxLoc: %s, varsLoc: %s, stmtLoc: %s",
ctxLoc.String(), ctxLocStr, stmtLocStr,

to

 intest.Assert(ctxLocStr == varsLocStr && ctxLocStr == stmtLocStr, 
 	"location mismatch, ctxLoc: %s, varsLoc: %s, stmtLoc: %s", 
- 	ctxLoc.String(), ctxLocStr, stmtLocStr, 
+ 	ctxLocStr, varsLocStr, stmtLocStr,

}

// Start starts the domain.
func (do *Domain) Start() error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about renaming it to StartBackgroundLoops and adding some comments that some SQL can still be executed before domain started.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

0006970

i think Start is clear enough

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jul 29, 2024
@YangKeao
Copy link
Member

Also, close #54860

Copy link
Member

@YangKeao YangKeao 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 bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 29, 2024
Copy link

ti-chi-bot bot commented Jul 29, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-29 02:41:35.492218757 +0000 UTC m=+150811.772266828: ☑️ agreed by lcwangchao.
  • 2024-07-29 06:20:14.226369387 +0000 UTC m=+163930.506417453: ☑️ agreed by YangKeao.

Copy link

ti-chi-bot bot commented Jul 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lcwangchao, wjhuang2016, YangKeao, zanmato1984

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Jul 29, 2024
@ti-chi-bot ti-chi-bot bot merged commit 108e98a into pingcap:master Jul 29, 2024
22 of 23 checks passed
@D3Hunter D3Hunter deleted the fix-domain-start branch July 29, 2024 07:52
This was referenced Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
5 participants