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

executor: add failpoints to control chunk size #52960

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

ekexium
Copy link
Contributor

@ekexium ekexium commented Apr 28, 2024

What problem does this PR solve?

Issue Number: ref #50215

Problem Summary:

We need to make chunk small enough to trigger multiple flushes in tests.

What changed and how does it work?

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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 28, 2024
@ekexium ekexium requested review from cfzjywxk and you06 April 28, 2024 10:10
Copy link

tiprow bot commented Apr 28, 2024

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

@@ -89,6 +90,9 @@ func newExecutorChunkAllocator(vars *variable.SessionVars, retFieldTypes []*type

// InitCap returns the initial capacity for chunk
func (e *executorChunkAllocator) InitCap() int {
failpoint.Inject("initCap", func (val failpoint.Value) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Dose it mean the chunk size would be a constant value If the initCap is set to a value same with maxChunkSize using both two failpoints?

Copy link
Contributor Author

@ekexium ekexium Apr 29, 2024

Choose a reason for hiding this comment

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

Yes that's my expectation. I do this primarily because I don't want to make initCap > maxChunkSize, which doesn't make sense, though the allocator code actually handles this case well.

Copy link

codecov bot commented Apr 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 56.0354%. Comparing base (66ba419) to head (220308d).
Report is 11 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #52960         +/-   ##
=================================================
- Coverage   72.3850%   56.0354%   -16.3496%     
=================================================
  Files          1482       1596        +114     
  Lines        428662     601093     +172431     
=================================================
+ Hits         310287     336825      +26538     
- Misses        99083     241223     +142140     
- Partials      19292      23045       +3753     
Flag Coverage Δ
integration 37.5287% <0.0000%> (?)
unit 53.0213% <0.0000%> (-18.1984%) ⬇️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 50.4509% <ø> (+9.2969%) ⬆️

Signed-off-by: ekexium <eke@fastmail.com>
Copy link

ti-chi-bot bot commented Apr 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, zyguan

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

Copy link

ti-chi-bot bot commented Apr 29, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-29 06:55:10.00272952 +0000 UTC m=+253863.759865109: ☑️ agreed by zyguan.
  • 2024-04-29 07:41:06.584204179 +0000 UTC m=+256620.341339751: ☑️ agreed by cfzjywxk.

@ti-chi-bot ti-chi-bot bot merged commit 20454c4 into pingcap:master Apr 29, 2024
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants