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

distsql: add flow setup cluster settings and improve debuggability #27404

Merged
merged 2 commits into from
Jul 12, 2018
Merged

distsql: add flow setup cluster settings and improve debuggability #27404

merged 2 commits into from
Jul 12, 2018

Conversation

asubiotto
Copy link
Contributor

This change adds flow setup-related cluster settings to give users the flexibility of increasing the default flow stream timeout to avoid inbound stream connection errors as well as controlling the maximum number of running flows on a node. Log messages have also been added to the flow scheduler to provide more insight into its operations and improve debugging.

@asubiotto asubiotto requested review from jordanlewis and a team July 11, 2018 17:01
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained


pkg/sql/distsqlrun/flow_scheduler.go, line 77 at r1 (raw file):

	fs.mu.queue = list.New()
	settingMaxRunningFlows.SetOnChange(&settings.SV, func() {
		fs.maxRunningFlows = int(settingMaxRunningFlows.Get(&settings.SV))

Isn't there a race here?

This gives users the ability to increase the default flow stream timeout
to avoid inbound stream connection errors as well as controlling the
maximum number of running flows on a node.

Release note (sql change): Add sql.distsql.{flow_stream_timeout,
max_running_flows} cluster settings to fine tune flow setup
Copy link
Contributor Author

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained


pkg/sql/distsqlrun/flow_scheduler.go, line 77 at r1 (raw file):

Previously, RaduBerinde wrote…

Isn't there a race here?

Yup, thanks for catching!

Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale)

@asubiotto
Copy link
Contributor Author

bors r+

craig bot pushed a commit that referenced this pull request Jul 12, 2018
27404: distsql: add flow setup cluster settings and improve debuggability r=asubiotto a=asubiotto

This change adds flow setup-related cluster settings to give users the flexibility of increasing the default flow stream timeout to avoid inbound stream connection errors as well as controlling the maximum number of running flows on a node. Log messages have also been added to the flow scheduler to provide more insight into its operations and improve debugging.

Co-authored-by: Alfonso Subiotto Marqués <[email protected]>
@craig
Copy link
Contributor

craig bot commented Jul 12, 2018

Build succeeded

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.

3 participants