Skip to content

Limit concurrency in planner to runtime.GOMAXPROCS(0) #168

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

Merged
merged 4 commits into from
Mar 31, 2022

Conversation

sidnei
Copy link
Collaborator

@sidnei sidnei commented Mar 31, 2022

Before this change: planner creates a new goroutine for each row, possibly causing resource exhaustion if there are too many rows.
After this change: planner will only create up to runtime.GOMAXPROCS(0) goroutines, limiting resource usage.

This change is based on the suggested implementation from golang/go#27837.

@xllora xllora merged commit 38cacc5 into google:master Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants