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: remove queueing in the flow scheduler #84888

Merged
merged 2 commits into from Oct 26, 2022

Conversation

yuzefovich
Copy link
Member

@yuzefovich yuzefovich commented Jul 22, 2022

flowinfra: de-duplicate cluster flow tests

Previously, there was a lot of duplication for two cluster flow tests
(one for the single tenant setup and another for the multi tenant
setup), and this commit cleans it up.

Release note: None

distsql: remove queueing in the flow scheduler

This commit removes the queueing behavior in the flow scheduler (which
is now renamed to "remote flow runner" to better reflect its purpose).
This behavior was already disabled on 22.2 (with a cluster setting that
could enable it back as an escape hatch) since we wanted to be
conservative when removing it, but I don't foresee any problems with
this, so it should be safe to remove it.

We don't remove the "cancel dead flow coordinator" since it might still
be useful in a mixed-version cluster, but more importantly the
coordinator will be refactored to also cancel the running flows (not
just the queued flows as it it used to). (This change will be in
a separate commit.)

This required removal some of the tests that relied on the queueing
behavior, but I don't think we're losing much test coverage.

Fixes: #34229.

Release note (sql change): sql.distsql.max_running_flows cluster
setting has been removed. This setting previously controlled the number
of remote DistSQL flows that a single node would run at any time. Once
that number was exceeded, the incoming flows would get queued until the
number was reduced. This was used as a poor man's version of the
admission control, but now that we have an actual admission control in
place, we don't need that queueing behavior.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@yuzefovich yuzefovich force-pushed the remove-flow-scheduler-limit branch 9 times, most recently from 81617ca to 7a6c798 Compare July 22, 2022 22:09
@yuzefovich yuzefovich added X-noremind Bots won't notify about PRs with X-noremind do-not-merge bors won't merge a PR with this label. labels Jul 26, 2022
@yuzefovich yuzefovich force-pushed the remove-flow-scheduler-limit branch 3 times, most recently from dc37e43 to cfc4ef2 Compare September 12, 2022 13:52
@yuzefovich yuzefovich force-pushed the remove-flow-scheduler-limit branch 2 times, most recently from 88aee9e to 438477e Compare October 10, 2022 13:07
@yuzefovich yuzefovich removed do-not-merge bors won't merge a PR with this label. X-noremind Bots won't notify about PRs with X-noremind labels Oct 10, 2022
@yuzefovich yuzefovich marked this pull request as ready for review October 10, 2022 13:11
@yuzefovich yuzefovich requested review from a team as code owners October 10, 2022 13:11
@yuzefovich yuzefovich requested a review from a team October 10, 2022 13:11
@yuzefovich yuzefovich requested a review from a team as a code owner October 10, 2022 13:11
@yuzefovich yuzefovich removed the request for review from a team October 10, 2022 13:11
@yuzefovich yuzefovich requested review from HonoreDB, michae2 and cucaroach and removed request for a team and HonoreDB October 10, 2022 13:11
Copy link
Contributor

@cucaroach cucaroach left a comment

Choose a reason for hiding this comment

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

Reviewed 24 of 24 files at r2, 33 of 33 files at r3, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @michae2)

Previously, there was a lot of duplication for two cluster flow tests
(one for the single tenant setup and another for the multi tenant
setup), and this commit cleans it up.

Release note: None
This commit removes the queueing behavior in the flow scheduler (which
is now renamed to "remote flow runner" to better reflect its purpose).
This behavior was already disabled on 22.2 (with a cluster setting that
could enable it back as an escape hatch) since we wanted to be
conservative when removing it, but I don't foresee any problems with
this, so it should be safe to remove it.

We don't remove the "cancel dead flow coordinator" since it might still
be useful in a mixed-version cluster, but more importantly the
coordinator will be refactored to also cancel the running flows (not
just the queued flows as it it used to). (This change will be in
a separate commit.)

This required removal some of the tests that relied on the queueing
behavior, but I don't think we're losing much test coverage.

Release note (sql change): `sql.distsql.max_running_flows` cluster
setting has been removed. This setting previously controlled the number
of remote DistSQL flows that a single node would run at any time. Once
that number was exceeded, the incoming flows would get queued until the
number was reduced. This was used as a poor man's version of the
admission control, but now that we have an actual admission control in
place, we don't need that queueing behavior.
@yuzefovich
Copy link
Member Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Oct 26, 2022

Build succeeded:

@craig craig bot merged commit 7dcb621 into cockroachdb:master Oct 26, 2022
@yuzefovich yuzefovich deleted the remove-flow-scheduler-limit branch October 27, 2022 02:54
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.

distsqlrun: eliminate queuing in flowScheduler and tune max_running_flows
3 participants