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

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

Merged

Conversation

andreimatei
Copy link
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 ajwerner and a team November 15, 2022 18:38
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
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
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
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