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

*: add InitChunkSize variable as chunk init capacity #8480

Merged
merged 4 commits into from
Jan 7, 2019
Merged

*: add InitChunkSize variable as chunk init capacity #8480

merged 4 commits into from
Jan 7, 2019

Conversation

lysu
Copy link
Contributor

@lysu lysu commented Nov 27, 2018

What problem does this PR solve?

  • enable chunk grow

What is changed and how it works?

  • Add init_chunk_size = 32
  • change max_chunk_size to 1024
  • global and session cross-fields validation

Check List

Tests

Code changes

  • Add init_chunk_size = 32
  • change max_chunk_size to 1024

Side effects

  • Possible performance regression(distsql/join/agg/sort will use 1024 because need other pr to change them)

Related changes

  • Need to be included in the release note

This change is Reviewable

@lysu
Copy link
Contributor Author

lysu commented Nov 27, 2018

/run-all-tests

@shenli
Copy link
Member

shenli commented Nov 27, 2018

What's the benefit of enable chunk grow?

@lysu lysu changed the title distsql,executor: enable chunk-grow & refine distsql batch distsql,executor: enable chunk-grow & refine distsql batch ctrl Nov 28, 2018
@lysu
Copy link
Contributor Author

lysu commented Nov 28, 2018

@shenli enable chunk grow will real enable chunk grow(previous doesn't), the main benefit is it will alloc small chunk for small query, and accelerate the first row return time for big query result.

@lysu
Copy link
Contributor Author

lysu commented Nov 28, 2018

/run-all-tests

@zz-jason
Copy link
Member

@lysu any update?

@lysu
Copy link
Contributor Author

lysu commented Dec 10, 2018

@zz-jason I will take time in this week, there are other high p thing under hands

@lysu
Copy link
Contributor Author

lysu commented Dec 10, 2018

@zz-jason and there are much test case rely on order that need address

@zhouqiang-cl
Copy link
Contributor

/run-all-tests

executor/export_test.go Outdated Show resolved Hide resolved
@zhouqiang-cl
Copy link
Contributor

/run-all-tests

@lysu
Copy link
Contributor Author

lysu commented Dec 29, 2018

@zz-jason @jackysp PTAL

util/mock/context.go Outdated Show resolved Hide resolved
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

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

LGTM

executor/distsql.go Outdated Show resolved Hide resolved
distsql/select_result.go Outdated Show resolved Hide resolved
distsql/select_result.go Outdated Show resolved Hide resolved
distsql/stream.go Outdated Show resolved Hide resolved
@zz-jason
Copy link
Member

zz-jason commented Jan 2, 2019

@lysu How about split the code change for "refine distsql batch ctrl" to another PR? Make this PR focused on "enable chunk-grow" and the new session variable.

@lysu
Copy link
Contributor Author

lysu commented Jan 2, 2019

@zz-jason ok~

@lysu lysu changed the title distsql,executor: enable chunk-grow & refine distsql batch ctrl *: add InitChunkSize variable Jan 2, 2019
@lysu lysu changed the title *: add InitChunkSize variable config: add InitChunkSize variable Jan 2, 2019
@lysu lysu changed the title config: add InitChunkSize variable config: add InitChunkSize variable as chunk init capacity Jan 2, 2019
@lysu
Copy link
Contributor Author

lysu commented Jan 3, 2019

/run-all-tests tidb-test=pr/711

@lysu
Copy link
Contributor Author

lysu commented Jan 3, 2019

/run-common-test tidb-test=pr/711
/run-integration-common-test tidb-test=pr/711

@lysu
Copy link
Contributor Author

lysu commented Jan 3, 2019

/run-unit-test tidb-test=pr/711

@lysu
Copy link
Contributor Author

lysu commented Jan 3, 2019

/run-unit-test tidb-test=pr/711 gofail=etcd-io

executor/aggregate_test.go Outdated Show resolved Hide resolved
sessionctx/variable/session.go Outdated Show resolved Hide resolved
sessionctx/variable/session.go Outdated Show resolved Hide resolved
session/session.go Outdated Show resolved Hide resolved
session/session.go Outdated Show resolved Hide resolved
session/session.go Outdated Show resolved Hide resolved
session/session.go Outdated Show resolved Hide resolved
@lysu
Copy link
Contributor Author

lysu commented Jan 4, 2019

/run-all-tests tidb-test=pr/711

@codecov-io
Copy link

codecov-io commented Jan 4, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@243d611). Click here to learn what that means.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #8480   +/-   ##
=========================================
  Coverage          ?   67.49%           
=========================================
  Files             ?      363           
  Lines             ?    75134           
  Branches          ?        0           
=========================================
  Hits              ?    50711           
  Misses            ?    19937           
  Partials          ?     4486
Impacted Files Coverage Δ
sessionctx/variable/sysvar.go 100% <ø> (ø)
table/tables/tables.go 52.81% <0%> (ø)
statistics/handle.go 83.43% <100%> (ø)
session/session.go 72.82% <100%> (ø)
executor/executor.go 66.76% <100%> (ø)
util/mock/context.go 21.11% <100%> (ø)
sessionctx/variable/session.go 30.84% <33.33%> (ø)
sessionctx/variable/varsutil.go 27.67% <50%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 243d611...a7dce62. Read the comment docs.

sessionctx/variable/varsutil.go Show resolved Hide resolved
sessionctx/variable/varsutil.go Show resolved Hide resolved
sessionctx/variable/varsutil.go Show resolved Hide resolved
session/session_test.go Outdated Show resolved Hide resolved
executor/join_test.go Outdated Show resolved Hide resolved
executor/aggregate_test.go Outdated Show resolved Hide resolved
executor/join_test.go Outdated Show resolved Hide resolved
@lysu
Copy link
Contributor Author

lysu commented Jan 4, 2019

PTAL again if free @zz-jason @eurekaka @XuHuaiyu thx

and also tidb-test https://github.com/pingcap/tidb-test/pull/711

@XuHuaiyu XuHuaiyu changed the title config: add InitChunkSize variable as chunk init capacity *: add InitChunkSize variable as chunk init capacity Jan 4, 2019
@lysu
Copy link
Contributor Author

lysu commented Jan 4, 2019

@XuHuaiyu @eurekaka PTAL thx

@lysu
Copy link
Contributor Author

lysu commented Jan 5, 2019

@XuHuaiyu @eurekaka PTAL thx

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 5, 2019
@zz-jason zz-jason requested review from XuHuaiyu and eurekaka January 5, 2019 13:13
@zz-jason
Copy link
Member

zz-jason commented Jan 5, 2019

/run-all-tests

@lysu
Copy link
Contributor Author

lysu commented Jan 5, 2019

/run-all-tests tidb-test=pr/711

1 similar comment
@lysu
Copy link
Contributor Author

lysu commented Jan 5, 2019

/run-all-tests tidb-test=pr/711

Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

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

LGTM

@eurekaka eurekaka added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jan 7, 2019
@jackysp jackysp merged commit 084aa5a into pingcap:master Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants