[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

workload repo: Merge Workload Repository into master #57148

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

wddevries
Copy link
Contributor

What problem does this PR solve?

Issue Number: ref #57147

Problem Summary:

This pull request merges in the Workload Repository code from the Serverless project. The project is not complete yet, and more testing remains to be done.

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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 6, 2024
Copy link
tiprow bot commented Nov 6, 2024

Hi @wddevries. 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 Nov 6, 2024

Codecov Report

Attention: Patch coverage is 68.51574% with 210 lines in your changes missing coverage. Please review.

Project coverage is 74.7192%. Comparing base (d0de86b) to head (5368a64).
Report is 34 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #57148        +/-   ##
================================================
+ Coverage   72.8369%   74.7192%   +1.8823%     
================================================
  Files          1677       1728        +51     
  Lines        464141     472889      +8748     
================================================
+ Hits         338066     353339     +15273     
+ Misses       105185      97319      -7866     
- Partials      20890      22231      +1341     
Flag Coverage Δ
integration 49.1759% <14.8425%> (?)
unit 72.2236% <66.5667%> (-0.0201%) ⬇️

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

Components Coverage Δ
dumpling 52.7673% <ø> (ø)
parser ∅ <ø> (∅)
br 61.1996% <ø> (+15.5050%) ⬆️

@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Nov 6, 2024
@@ -10,6 +10,7 @@ go_library(
"//pkg/config",
Copy link
Member

Choose a reason for hiding this comment

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

Can you add some test cases for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure exactly what you mean, but we are in the process of creating tests for this code.

Copy link
Contributor
@henrybw henrybw left a comment

Choose a reason for hiding this comment

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

The rest of the changes LGTM.

pkg/domain/repository/worker.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 8, 2024
@ti-chi-bot ti-chi-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 9, 2024
@wddevries wddevries force-pushed the rebase_to_master branch 2 times, most recently from c79b50e to 2c50ab3 Compare November 13, 2024 05:56
@bb7133
Copy link
Member
bb7133 commented Nov 15, 2024

/retest

@wddevries
Copy link
Contributor Author

/test pull-integration-ddl-test

Copy link
tiprow bot commented Nov 15, 2024

@wddevries: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test fast_test_tiprow_ddlargsv1
  • /test tidb_parser_test

Use /test all to run the following jobs that were automatically triggered:

  • fast_test_tiprow
  • tidb_parser_test

In response to this:

/test pull-integration-ddl-test

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
Contributor
@xhebox xhebox left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -4070,6 +4070,9 @@ var systemTables = map[string]struct{}{
}

func isUndroppableTable(schema, table string) bool {
if schema == "workload_schema" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should use const in repository package. Removing depedency is great, but it will also be convenient when we want to know all occurences of schema table name by searching workloadSchemaCIStr.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Nov 18, 2024
Copy link
Contributor
@henrybw henrybw left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
ti-chi-bot bot commented Nov 18, 2024

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

In response to this:

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/test-infra repository.

@Benjamin2037
Copy link
Collaborator
Benjamin2037 commented Nov 20, 2024

Can we move repository package out of Domain PKG,since I do not think it is related to Domain and we planing to further refactor of Domain definition and interface granularly. It is better that repository's implement code should be organized in another proper place. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

prefer name this pkg as workloadrepo, repository is too generic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will move the package. I'll discuss the name with the others, but I am not opposed to renaming it.

@D3Hunter D3Hunter changed the title repository: Merge Workload Repository into master workload repo: Merge Workload Repository into master Nov 20, 2024
Copy link
Contributor
@D3Hunter D3Hunter left a comment

Choose a reason for hiding this comment

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

and I believe this is a feature, not enhancement, need PM approve first

@D3Hunter
Copy link
Contributor

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 20, 2024
@xhebox
Copy link
Contributor
xhebox commented Nov 20, 2024

and I believe this is a feature, not enhancement, need PM approve first

It is approved.

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 20, 2024
@D3Hunter
Copy link
Contributor

@xhebox please ask if it's ok to unhold before doing it, i hold it also for the comments of myself and @Benjamin2037

xhebox and others added 22 commits November 27, 2024 13:32
* repository: sample and snapshot threads

Signed-off-by: xhe <xw897002528@gmail.com>

* fix

Signed-off-by: xhe <xw897002528@gmail.com>

* fix

Signed-off-by: xhe <xw897002528@gmail.com>

* address comments

Signed-off-by: xhe <xw897002528@gmail.com>

* address comments

Signed-off-by: xhe <xw897002528@gmail.com>

* address coments

Signed-off-by: xhe <xw897002528@gmail.com>

* address coments

Signed-off-by: xhe <xw897002528@gmail.com>

* address comments

Signed-off-by: xhe <xw897002528@gmail.com>

* address comments

Signed-off-by: xhe <xw897002528@gmail.com>

* address comments

Signed-off-by: xhe <xw897002528@gmail.com>

---------

Signed-off-by: xhe <xw897002528@gmail.com>
…als. (pingcap#1317)

* Add global variables to control sampling intervals in the Workload Repository.

* Return error when etc client is not available.

* Rework error messages.

* Fix required comments.

* Switch to using Ticker.Reset instead of restarting Fiber.

* Use swap instead of load and store.

* Make a couple of minor changes.

* Fix issues
Signed-off-by: xhe <xw897002528@gmail.com>
* Wrap exit with a context.Context.

* Remove getGlobalVar from Worker.

* Seperate Repository from Domain.

* Use RegisterSysVar instead of defining varibles in SysVar.go

* Move samplingInterval and snapshotInterval to Worker.

* Convert setRepositoryDest to a method of Worker.

* Make Worker private to the repository package.

* Add error handling in SetupRepository and disable repository.

* Change to statically allocated worker class and enable repository.

* Don't wait on exit channel for domain.

* Stop the repository from cleanup in main.go.

* Fix nits and move the error check for etcd later in start().

* Add comments on public methods.

* Fix error message format.
Signed-off-by: xhe <xw897002528@gmail.com>
Copy link
Collaborator
@Benjamin2037 Benjamin2037 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
ti-chi-bot bot commented Dec 2, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Benjamin2037, henrybw, xhebox
Once this PR has been reviewed and has the lgtm label, please assign wjhuang2016 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 2, 2024
Copy link
ti-chi-bot bot commented Dec 2, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-18 02:40:53.091740391 +0000 UTC m=+842415.282609373: ☑️ agreed by xhebox.
  • 2024-12-02 07:17:20.623003209 +0000 UTC m=+1052828.242657725: ☑️ agreed by Benjamin2037.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. 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.

7 participants