-
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
plan/statistics: concurrent build columns #2713
Merged
+107
−52
Merged
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b5ef1a0
plan/statistics: concurrent build columns
alivxxx e5209dc
plan/statistics: fix data race
alivxxx a0c0d2c
Merge branch 'master' of github.com:pingcap/tidb into xhb/concurrent-…
alivxxx ae85dca
address comment and fix bug of caculation of bucketIdx after merge
alivxxx 51e27eb
address comment
alivxxx 30982c5
fix typo
alivxxx 3a3634a
add session variable to control concurrency
alivxxx ff334b9
fix typo
alivxxx 65f963e
fix session variables
alivxxx 1d719a8
Merge branch 'master' of github.com:pingcap/tidb into xhb/concurrent-…
alivxxx 2c2a3ec
plan: change Sv to Ctx
alivxxx d8d4691
plan/statistics, sessionctx: refactor code
alivxxx 39f98cc
Merge branch 'master' of github.com:pingcap/tidb into xhb/concurrent-…
alivxxx 9a53627
Merge branch 'master' into xhb/concurrent-build-stats
shenli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,21 +190,21 @@ func (s *testStatisticsSuite) TestTable(c *C) { | |
c.Check(count, Equals, int64(1)) | ||
count, err = col.LessRowCount(sc, types.NewIntDatum(20000)) | ||
c.Check(err, IsNil) | ||
c.Check(count, Equals, int64(19980)) | ||
c.Check(count, Equals, int64(19984)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the test result be changed ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because there was a bug when caculate the |
||
count, err = col.BetweenRowCount(sc, types.NewIntDatum(30000), types.NewIntDatum(35000)) | ||
c.Check(err, IsNil) | ||
c.Check(count, Equals, int64(4696)) | ||
c.Check(count, Equals, int64(4618)) | ||
|
||
col = t.Columns[2] | ||
count, err = col.EqualRowCount(sc, types.NewIntDatum(10000)) | ||
c.Check(err, IsNil) | ||
c.Check(count, Equals, int64(1)) | ||
count, err = col.LessRowCount(sc, types.NewIntDatum(20000)) | ||
c.Check(err, IsNil) | ||
c.Check(count, Equals, int64(20136)) | ||
c.Check(count, Equals, int64(20224)) | ||
count, err = col.BetweenRowCount(sc, types.NewIntDatum(30000), types.NewIntDatum(35000)) | ||
c.Check(err, IsNil) | ||
c.Check(count, Equals, int64(5083)) | ||
c.Check(count, Equals, int64(5120)) | ||
|
||
str := t.String() | ||
c.Check(len(str), Greater, 0) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
If error happened, then this function return, leave
doneCh
alone.worker goroutine still waiting for write to
doneCh
, and would block forever, then goroutine leak .....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.
I was following the logic at https://github.com/pingcap/tidb/blob/master/domain/domain.go#L103.
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.
@tiancaiamao The length of channel is len(splittedOffsets). It will never be blocked. PTAL