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

sqlmigrations: really skip baked-in migrations when asked to skip them #40567

Merged
merged 1 commit into from
Sep 7, 2019

Conversation

andreimatei
Copy link
Contributor

EnsureMigrations() optinally can be told to skip the migrations that are
included in the bootstrap schema when the node running the migrations
has just bootstraped the cluster. Except the mechanism wasn't actually
skipping them. This patch fixes that. There are two places in that
function where we check if we can skip a migration, and only one of them
was correct.

The whole idea of skipping these migrations is arguable because the
check only applies to the node that bootstrapped the cluster. All the
other nodes will still run them. So I can also get rid of the thing if
reviewers ask.

Release note: None

EnsureMigrations() optinally can be told to skip the migrations that are
included in the bootstrap schema when the node running the migrations
has just bootstraped the cluster. Except the mechanism wasn't actually
skipping them. This patch fixes that. There are two places in that
function where we check if we can skip a migration, and only one of them
was correct.

The whole idea of skipping these migrations is arguable because the
check only applies to the node that bootstrapped the cluster. All the
other nodes will still run them. So I can also get rid of the thing if
reviewers ask.

Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@jordanlewis jordanlewis left a comment

Choose a reason for hiding this comment

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

LGTM

@andreimatei
Copy link
Contributor Author

andreimatei commented Sep 7, 2019 via email

craig bot pushed a commit that referenced this pull request Sep 7, 2019
40567: sqlmigrations: really skip baked-in migrations when asked to skip them r=andreimatei a=andreimatei

EnsureMigrations() optinally can be told to skip the migrations that are
included in the bootstrap schema when the node running the migrations
has just bootstraped the cluster. Except the mechanism wasn't actually
skipping them. This patch fixes that. There are two places in that
function where we check if we can skip a migration, and only one of them
was correct.

The whole idea of skipping these migrations is arguable because the
check only applies to the node that bootstrapped the cluster. All the
other nodes will still run them. So I can also get rid of the thing if
reviewers ask.

Release note: None

Co-authored-by: Andrei Matei <andrei@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Sep 7, 2019

Build succeeded

@craig craig bot merged commit 4b2b434 into cockroachdb:master Sep 7, 2019
@andreimatei andreimatei deleted the sqlmigrations.skip-baked-in branch September 11, 2019 19:49
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