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

workerpool: generic result type for worker pool #46185

Merged
merged 8 commits into from
Aug 21, 2023

Conversation

tangenta
Copy link
Contributor

@tangenta tangenta commented Aug 17, 2023

What problem does this PR solve?

Issue Number: ref #46258

Problem Summary:

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

@tangenta tangenta added the skip-issue-check Indicates that a PR no need to check linked issue. label Aug 17, 2023
@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 Aug 17, 2023
@tiprow
Copy link

tiprow bot commented Aug 17, 2023

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

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Merging #46185 (d957e54) into master (740f7f5) will decrease coverage by 2.0602%.
Report is 29 commits behind head on master.
The diff coverage is 91.1111%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #46185        +/-   ##
================================================
- Coverage   74.7668%   72.7067%   -2.0602%     
================================================
  Files          1297       1306         +9     
  Lines        398753     401022      +2269     
================================================
- Hits         298135     291570      -6565     
- Misses        81227      90933      +9706     
+ Partials      19391      18519       -872     
Flag Coverage Δ
integration 25.5558% <0.0000%> (-20.6923%) ⬇️
unit 73.3875% <91.1111%> (+0.0316%) ⬆️

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

Components Coverage Δ
dumpling 54.0444% <ø> (ø)
parser 85.0775% <ø> (+0.0118%) ⬆️
br 47.8698% <ø> (-16.6584%) ⬇️

@@ -308,12 +308,12 @@ func (b *ingestBackfillScheduler) setupWorkers() error {
}
b.copReqSenderPool = copReqSenderPool
readerCnt, writerCnt := b.expectedWorkerSize()
skipReg := workerpool.OptionSkipRegister[idxRecResult]{}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's make it the default skip because the feature is immature.

@tangenta tangenta removed the skip-issue-check Indicates that a PR no need to check linked issue. label Aug 21, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 21, 2023

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

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

Copy link
Member

@wjhuang2016 wjhuang2016 left a comment

Choose a reason for hiding this comment

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

The worker pool doesn't need to collect the result in theory, which makes it complex. If we need to know the result, we can wrap these workers as a WorkerWIthResult to collect the result, then include the real worker.

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 21, 2023
Copy link
Contributor

@GMHDBJD GMHDBJD 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
Copy link

ti-chi-bot bot commented Aug 21, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: GMHDBJD, wjhuang2016, ywqzzy

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:
  • OWNERS [GMHDBJD,wjhuang2016]

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 Aug 21, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 21, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-08-21 05:52:04.139405578 +0000 UTC m=+1128688.688421550: ☑️ agreed by wjhuang2016.
  • 2023-08-21 06:01:05.797366676 +0000 UTC m=+1129230.346382663: ☑️ agreed by GMHDBJD.

@ti-chi-bot ti-chi-bot bot merged commit bc88e13 into pingcap:master Aug 21, 2023
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
Development

Successfully merging this pull request may close these issues.

4 participants