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

variable: set default hash join concurrency in NewSessionVars #6295

Merged
merged 3 commits into from
Apr 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sessionctx/variable/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ func NewSessionVars() *SessionVars {
IndexLookupConcurrency: DefIndexLookupConcurrency,
IndexSerialScanConcurrency: DefIndexSerialScanConcurrency,
IndexLookupJoinConcurrency: DefIndexLookupJoinConcurrency,
HashJoinConcurrency: DefTiDBHashJoinConcurrency,
DistSQLScanConcurrency: DefDistSQLScanConcurrency,
MaxChunkSize: DefMaxChunkSize,
DMLBatchSize: DefDMLBatchSize,
Expand Down
24 changes: 24 additions & 0 deletions sessionctx/variable/varsutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,30 @@ func (s *testVarsutilSuite) TestTiDBOptOn(c *C) {
}
}

func (s *testVarsutilSuite) TestNewSessionVars(c *C) {
defer testleak.AfterTest(c)()
vars := NewSessionVars()

c.Assert(vars.BuildStatsConcurrencyVar, Equals, DefBuildStatsConcurrency)
c.Assert(vars.IndexJoinBatchSize, Equals, DefIndexJoinBatchSize)
c.Assert(vars.IndexLookupSize, Equals, DefIndexLookupSize)
c.Assert(vars.IndexLookupConcurrency, Equals, DefIndexLookupConcurrency)
c.Assert(vars.IndexSerialScanConcurrency, Equals, DefIndexSerialScanConcurrency)
c.Assert(vars.IndexLookupJoinConcurrency, Equals, DefIndexLookupJoinConcurrency)
c.Assert(vars.HashJoinConcurrency, Equals, DefTiDBHashJoinConcurrency)
c.Assert(vars.DistSQLScanConcurrency, Equals, DefDistSQLScanConcurrency)
c.Assert(vars.MaxChunkSize, Equals, DefMaxChunkSize)
c.Assert(vars.DMLBatchSize, Equals, DefDMLBatchSize)
c.Assert(vars.MemQuotaQuery, Equals, int64(DefTiDBMemQuotaQuery))
c.Assert(vars.MemQuotaHashJoin, Equals, int64(DefTiDBMemQuotaHashJoin))
c.Assert(vars.MemQuotaMergeJoin, Equals, int64(DefTiDBMemQuotaMergeJoin))
c.Assert(vars.MemQuotaSort, Equals, int64(DefTiDBMemQuotaSort))
c.Assert(vars.MemQuotaTopn, Equals, int64(DefTiDBMemQuotaTopn))
c.Assert(vars.MemQuotaIndexLookupReader, Equals, int64(DefTiDBMemQuotaIndexLookupReader))
c.Assert(vars.MemQuotaIndexLookupJoin, Equals, int64(DefTiDBMemQuotaIndexLookupJoin))
c.Assert(vars.MemQuotaNestedLoopApply, Equals, int64(DefTiDBMemQuotaNestedLoopApply))
}

func (s *testVarsutilSuite) TestVarsutil(c *C) {
defer testleak.AfterTest(c)()
v := NewSessionVars()
Expand Down