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

*: use goroutine pool to avoid runtime.morestack #3753

Merged
merged 5 commits into from Sep 22, 2017

Conversation

Projects
None yet
4 participants
@tiancaiamao
Contributor

tiancaiamao commented Jul 14, 2017

Maybe this branch works, you can have a try. @siddontang

@coocood

This comment has been minimized.

Show comment
Hide comment
@coocood

coocood Sep 12, 2017

Member

@tiancaiamao
Please resolve the conflict

Member

coocood commented Sep 12, 2017

@tiancaiamao
Please resolve the conflict

@tiancaiamao tiancaiamao changed the title from [DNM] *: use goroutine pool to avoid runtime.morestack to *: use goroutine pool to avoid runtime.morestack Sep 15, 2017

@tiancaiamao tiancaiamao changed the base branch from tiancaiamao/goroutine-pool to master Sep 15, 2017

@tiancaiamao tiancaiamao removed the status/DNM label Sep 18, 2017

@coocood

This comment has been minimized.

Show comment
Hide comment
@coocood

coocood Sep 21, 2017

Member

@tiancaiamao
Can we remove the Skip in test now?

Member

coocood commented Sep 21, 2017

@tiancaiamao
Can we remove the Skip in test now?

@@ -43,6 +44,8 @@ const (
minLogDuration = 50 * time.Millisecond
)
var xIndexSelectGP = gp.New(3 * time.Minute)

This comment has been minimized.

@winkyao

winkyao Sep 21, 2017

Member

why use diffrent idleTimeout?

@winkyao

winkyao Sep 21, 2017

Member

why use diffrent idleTimeout?

This comment has been minimized.

@tiancaiamao

tiancaiamao Sep 22, 2017

Contributor

It doesn't matter whether it 2mins or 3mins or anything.

@tiancaiamao

tiancaiamao Sep 22, 2017

Contributor

It doesn't matter whether it 2mins or 3mins or anything.

reserveStack(false)
for _, batch1 := range batches {
batch := batch1

This comment has been minimized.

@winkyao

winkyao Sep 21, 2017

Member

why not just use batch1?

@winkyao

winkyao Sep 21, 2017

Member

why not just use batch1?

This comment has been minimized.

@tiancaiamao

tiancaiamao Sep 22, 2017

Contributor

That's a good habit ! @winkyao
When using closure along with range operation, it's easy to get suck:

	arr := []int{1, 2, 3, 4}
	for _, v := range arr {
		go func() {
			fmt.Println(v)   // guess the result?
		}()
	}
@tiancaiamao

tiancaiamao Sep 22, 2017

Contributor

That's a good habit ! @winkyao
When using closure along with range operation, it's easy to get suck:

	arr := []int{1, 2, 3, 4}
	for _, v := range arr {
		go func() {
			fmt.Println(v)   // guess the result?
		}()
	}

This comment has been minimized.

@winkyao

winkyao Sep 22, 2017

Member

got it!

@winkyao

winkyao Sep 22, 2017

Member

got it!

@coocood

LGTM

@coocood

This comment has been minimized.

Show comment
Hide comment
@coocood

coocood Sep 22, 2017

Member

/run-all-test

Member

coocood commented Sep 22, 2017

/run-all-test

@coocood coocood merged commit 040ad18 into master Sep 22, 2017

10 of 11 checks passed

jenkins-ci-tidb/unit-test Jenkins job failed
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on master at 72.386%
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
jenkins-ci-tidb/common-test Jenkins job succeeded.
Details
jenkins-ci-tidb/integration-common-test Jenkins job succeeded.
Details
jenkins-ci-tidb/integration-ddl-test Jenkins job succeeded.
Details
jenkins-ci-tidb/mybatis-test Jenkins job succeeded.
Details
jenkins-ci-tidb/sqllogic-test Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@coocood coocood deleted the tiancaiamao/morestack branch Sep 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment