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

sql: introduce new syntax to set the cluster version #56542

Open
irfansharif opened this issue Nov 11, 2020 · 0 comments
Open

sql: introduce new syntax to set the cluster version #56542

irfansharif opened this issue Nov 11, 2020 · 0 comments
Labels
A-sql-syntax Issues strictly related to the SQL grammar, with no semantic aspect C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. E-starter Might be suitable for a starter project for new employees or team members. T-release Release Engineering & Automation Team

Comments

@irfansharif
Copy link
Contributor

irfansharif commented Nov 11, 2020

After #56480 lands, we'll have completely disconnected the version setting from the usual gossip-backed cluster settings infrastructure. #56480 introduces crdb internal RPCs to bump version gates on each nodes, instead of waiting on gossip updates carrying information about version changes. Given that it is effectively no longer a cluster setting internally, we should stop pretending it is so externally.

Strawman syntax:

wtvs@wherevs> SHOW ACTIVE VERSION;
  version
-----------
  20.2
(1 row)

Time: 3ms total (execution 2ms / network 0ms)
wtvs@wherevs> SET ACTIVE VERSION = '21.2';
SET ACTIVE VERSION

Time: 4ms total (execution 4ms / network 0ms)

Doing so will lend to some much needed code simplification within crdb. It's also better UX for our users, I think. Our existing version "setting" is way more than a setting. It drives a lot of machinery under the hood, enables feature gates, and is a crucial part of cluster upgrades. It stands out relative to our other cluster settings (which very much are "just settings"), and can't be simply changed around willy nilly. Doing the above will make our documentation around cluster upgrades easier to follow, where we can then introduce just this one additional concept (the active version) instead of sneaking it in with cluster settings and its gossip backed distribution mechanism.

One additional thing to note here is that in 21.1, setting the active version will kick off arbitrarily long running migrations within crdb (see #48843). These things, like the name suggests can take a super long time to wrap up, and the statement above (and the existing SET CLUSTER SETTING version statement today) is not expected to return until it's completed. Users will be able to introspect progress through a systems table (similar to how jobs are exposed). Given that this is "new" behavior, I think serves as evidence that we should motivate it by introducing new syntax to match. +cc @tbg, @knz.


Randomly assigning it to our SQL experience team, which is where I think this belongs.

@irfansharif irfansharif added C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. A-sql-syntax Issues strictly related to the SQL grammar, with no semantic aspect labels Nov 11, 2020
@rafiss rafiss added the E-starter Might be suitable for a starter project for new employees or team members. label Nov 24, 2020
@solongordon solongordon removed their assignment May 4, 2021
@rafiss rafiss added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label May 12, 2021
@cockroachdb cockroachdb deleted a comment from SooryR Jul 13, 2022
@cockroachdb cockroachdb deleted a comment from SooryR Jul 13, 2022
@rafiss rafiss removed the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Nov 9, 2022
@rafiss rafiss added the T-release Release Engineering & Automation Team label Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-syntax Issues strictly related to the SQL grammar, with no semantic aspect C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. E-starter Might be suitable for a starter project for new employees or team members. T-release Release Engineering & Automation Team
Projects
None yet
Development

No branches or pull requests

3 participants