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

workloadrepo: add admin create workload snapshot stmt #58250

Merged
merged 4 commits into from
Jan 2, 2025

Conversation

xhebox
Copy link
Contributor

@xhebox xhebox commented Dec 13, 2024

What problem does this PR solve?

Issue Number: close #58248

Problem Summary: as title, a new syntax to trigger snapshot manually.

What changed and how does it work?

  1. Minimal changes to parser/planner/executor
  2. Due to cyclic imports, I must export some "internal" interfaces in workloadrepo

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • 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. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 13, 2024
Copy link

tiprow bot commented Dec 13, 2024

Hi @xhebox. 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.

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 67.69231% with 21 lines in your changes missing coverage. Please review.

Project coverage is 73.6982%. Comparing base (42d4fae) to head (428b015).
Report is 23 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58250        +/-   ##
================================================
+ Coverage   73.1093%   73.6982%   +0.5889%     
================================================
  Files          1676       1677         +1     
  Lines        463354     465749      +2395     
================================================
+ Hits         338755     343249      +4494     
+ Misses       103788     101699      -2089     
+ Partials      20811      20801        -10     
Flag Coverage Δ
integration 42.9711% <3.1746%> (?)
unit 72.4575% <67.6923%> (+0.1513%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.8297% <ø> (+0.0273%) ⬆️

Copy link

@songrijie songrijie left a comment

Choose a reason for hiding this comment

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

The syntax LGTM

Copy link

ti-chi-bot bot commented Dec 16, 2024

@songrijie: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

The syntax LGTM

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.

pkg/executor/builder.go Outdated Show resolved Hide resolved
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 bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Dec 18, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 30, 2024
Copy link

ti-chi-bot bot commented Dec 30, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-18 02:15:18.28309657 +0000 UTC m=+1009508.371899112: ☑️ agreed by bb7133.
  • 2024-12-30 10:13:27.252313295 +0000 UTC m=+345342.608317864: ☑️ agreed by lcwangchao.

@xhebox
Copy link
Contributor Author

xhebox commented Dec 30, 2024

/retest

Copy link

tiprow bot commented Dec 30, 2024

@xhebox: 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.

@xhebox
Copy link
Contributor Author

xhebox commented Dec 30, 2024

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Dec 30, 2024
@bb7133
Copy link
Member

bb7133 commented Dec 31, 2024

/retest

Signed-off-by: xhe <[email protected]>
@xhebox
Copy link
Contributor Author

xhebox commented Dec 31, 2024

/retest

Copy link
Member

@Rustin170506 Rustin170506 left a comment

Choose a reason for hiding this comment

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

The planner changes look good to me.

I just asked a few questions about things I didn’t understand. Feel free to ignore them if they’re not a big deal.

Thanks! :shipit:

require.Eventually(t, func() bool {
res := tk.MustQuery("select snap_id, count(*) from workload_schema.hist_snapshots group by snap_id").Rows()
return len(res) >= 1
}, time.Minute, time.Second)
Copy link
Member

Choose a reason for hiding this comment

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

At most, a minute seems pretty big.

Copy link
Contributor Author

@xhebox xhebox Jan 2, 2025

Choose a reason for hiding this comment

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

I am afraid of the unstable CI env. But the test itself should be fairly stable. It will either fail after one minute or pass in seconds. I except that it will always pass around ten seconds.

pkg/util/workloadrepo/worker_test.go Show resolved Hide resolved
Copy link

ti-chi-bot bot commented Jan 2, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, lcwangchao, Rustin170506, songrijie, yudongusa

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 Jan 2, 2025
@ti-chi-bot ti-chi-bot bot merged commit 8a33068 into pingcap:master Jan 2, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

workloadrepo: custom SQL to trigger snapshot
6 participants