-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Conversation
Hi @ekexium. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with 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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Codecov ReportAttention: Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more.
|
e150922
to
e77c43b
Compare
Signed-off-by: ekexium <[email protected]>
e77c43b
to
220308d
Compare
[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 |
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
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.