Skip to content

startupmigrations: remove no-op SET CLUSTER SETTING version#91931

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
andreimatei:upgrades.cluster-ver-migration-2
Nov 16, 2022
Merged

startupmigrations: remove no-op SET CLUSTER SETTING version#91931
craig[bot] merged 1 commit intocockroachdb:masterfrom
andreimatei:upgrades.cluster-ver-migration-2

Conversation

@andreimatei
Copy link
Copy Markdown
Contributor

The migration writing the initial value of the cluster version setting was also performing a SET CLUSTER SETTING version = v, where v was the version is had just written in the settings table. This statement was a no-op, because it amounted to an update from v to v [1]. This patch removes the statement.

[1]

if from == to {
// Nothing to do here.
log.Infof(ctx, "no need to migrate, cluster already at newest version")
return nil
}

@andreimatei andreimatei requested review from a team and ajwerner November 15, 2022 18:38
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@ajwerner ajwerner 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! 1 of 0 LGTMs obtained

The migration writing the initial value of the cluster version setting
was also performing a `SET CLUSTER SETTING version = v`, where v was the
version is had just written in the settings table. This statement was a
no-op, because it amounted to an update from v to v [1].
This patch removes the statement.

[1] https://github.com/cockroachdb/cockroach/blob/f87728fee6d16e2a352ac76e7ae9225930032ce6/pkg/upgrade/upgrademanager/manager.go#L167-L171

Release note: None
Epic: None
@andreimatei andreimatei force-pushed the upgrades.cluster-ver-migration-2 branch from 158cf7c to b350828 Compare November 16, 2022 17:20
@andreimatei andreimatei requested a review from a team November 16, 2022 17:20
@andreimatei andreimatei requested a review from a team as a code owner November 16, 2022 17:20
Copy link
Copy Markdown
Contributor Author

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

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

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @irfansharif)

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 16, 2022

Build succeeded:

@craig craig bot merged commit 7c7622f into cockroachdb:master Nov 16, 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.

3 participants