lease: migrate lease to rbr compatible index#98446
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Mar 16, 2023
Merged
lease: migrate lease to rbr compatible index#98446craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
d67a639 to
e7a2512
Compare
This was referenced Mar 13, 2023
This was referenced Mar 13, 2023
64a52fe to
0248924
Compare
jeffswenson
added a commit
to jeffswenson/cockroach
that referenced
this pull request
Mar 14, 2023
Previously the role members test used the v23_1 schema with the V23_1RoleMembersTableHasIDColumns version gate. This caused problems for PR cockroachdb#98446 because the lease schema does not match the lease version gates. Now, the test uses the BootstrapVersionKeyOverride to bootstrap with the V22_2 schema. Setting the cluster version walks the cluster through all of the migrations including the role members migration. Part of cockroachdb#98446 Release Note: none
ajwerner
approved these changes
Mar 14, 2023
Contributor
ajwerner
left a comment
There was a problem hiding this comment.
Seems straightforward enough. There's a test that's failing related to the mixed version state that seems interesting.
Reviewed 18 of 18 files at r2, all commit messages.
Reviewable status:complete! 0 of 0 LGTMs obtained
Collaborator
Author
I'll root cause the failure before merging this. The test is failing consistently. The schema changer is getting stuck trying to roll back a change and the error seems to suggest it is leasing related: |
craig bot
pushed a commit
that referenced
this pull request
Mar 15, 2023
98613: upgrades: use v22_2 bootstrap schema with role_members test r=JeffSwenson a=JeffSwenson Previously the role members test used the v23_1 schema with the V23_1RoleMembersTableHasIDColumns version gate. This caused problems for PR #98446 because the lease schema does not match the lease version gates. Now, the test uses the BootstrapVersionKeyOverride to bootstrap with the V22_2 schema. Setting the cluster version walks the cluster through all of the migrations including the role members migration. Part of #98446 Release Note: none Co-authored-by: Jeff <swenson@cockroachlabs.com>
jeffswenson
added a commit
to jeffswenson/cockroach
that referenced
this pull request
Mar 15, 2023
Previously, the v22.2-v23.1 mixed version test was using the v22.2 version gate with a v23.1 schema. This caused the alter_table test to fail on PR cockroachdb#98446. The lease protocol only works if the version gates and the schema are in sync. As part of this change I simplified the version configuration in the logic tests so that the only version key is the bootstrap version. It doesn't really make sense to specify a binary version different than the build version. The binary will always have the build version's behavior. This change also deletes the local-v1.1-at-v1.0-noupgrade test. The version can't be described by a version key and the tests do not represent a situation that occurs in real world deployments. Part of cockroachdb#94843 Release note: None
0248924 to
42b99ce
Compare
jeffswenson
added a commit
to jeffswenson/cockroach
that referenced
this pull request
Mar 15, 2023
Previously, the v22.2-v23.1 mixed version test was using the v22.2 version gate with a v23.1 schema. This caused the alter_table test to fail on PR cockroachdb#98446. The lease protocol only works if the version gates and the schema are in sync. As part of this change I simplified the version configuration in the logic tests so that the only version key is the bootstrap version. It doesn't really make sense to specify a binary version different than the build version. The binary will always have the build version's behavior. This change also deletes the local-v1.1-at-v1.0-noupgrade test. The version can't be described by a version key and the tests do not represent a situation that occurs in real world deployments. Part of cockroachdb#94843 Release note: None
jeffswenson
added a commit
to jeffswenson/cockroach
that referenced
this pull request
Mar 15, 2023
Previously, the v22.2-v23.1 mixed version test was using the v22.2 version gate with a v23.1 schema. This caused the alter_table test to fail on PR cockroachdb#98446. The lease protocol only works if the version gates and the schema are in sync. As part of this change I simplified the version configuration in the logic tests so that the only version key is the bootstrap version. It doesn't really make sense to specify a binary version different than the build version. The binary will always have the build version's behavior. This change also deletes the local-v1.1-at-v1.0-noupgrade test. The version can't be described by a version key and the tests do not represent a situation that occurs in real world deployments. Part of cockroachdb#94843 Release note: None
craig bot
pushed a commit
that referenced
this pull request
Mar 15, 2023
98695: logictest: use v22_2 schema in mixed version test r=JeffSwenson a=JeffSwenson Previously, the v22.2-v23.1 mixed version test was using the v22.2 version gate with a v23.1 schema. This caused the alter_table test to fail on PR #98446. The lease protocol only works if the version gates and the schema are in sync. As part of this change I simplified the version configuration in the logic tests so that the only version key is the bootstrap version. It doesn't really make sense to specify a binary version different than the build version. The binary will always have the build version's behavior. This change also deletes the local-v1.1-at-v1.0-noupgrade test. The version can't be described by a version key and the tests do not represent a situation that occurs in real world deployments. Part of #94843 Release note: None 98697: sql: make sure mixed version logic tests are enabled for declarative schema changer enabled DDL in 22.2 r=chengxiong-ruan a=chengxiong-ruan Informs: #98637 This PR makes sure we enable mixed version logic tests for ddl statements enabled in declarative schema changer in 22.2. We already have mixed version test coverage for `CREATE INDEX`, `DROP INDEX`, `ADD COLUMN`, `DROP COLUMN` and `ADD CONSTRAINT`. Each commit turns on mixed version logic test for each of `DROP OWNED BY`, `COMMENT ON` and `ALTER PRIMARY KEY`. 98711: storage,kv: reenable rewrite concurrency and add format error checking r=jbowens a=sumeerbhola Epic: none Fixes: #97076 Release note: None Co-authored-by: Jeff <swenson@cockroachlabs.com> Co-authored-by: Chengxiong Ruan <chengxiongruan@gmail.com> Co-authored-by: sumeerbhola <sumeer@cockroachlabs.com>
Migrate the system.lease table to an index that is byte compatible with a regional by row index. The version gates are intended to follow the protocol discussed in the comment at the top of upgrades/system_rbr_indexes.go Writing to the lease table always occurs throught he kv API. The table is read via the SQL api. The SQL uses of the system.lease table are forwards compatible as long as they do not need to read the crdb_region. Queries that interact with individual leases need to retrieve the crdb_region and must consult the version gate. Part of cockroachdb#94843 Release Note: None
42b99ce to
ee55464
Compare
Collaborator
Author
|
bors r+ |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate the system.lease table to an index that is byte compatible with
a regional by row index. The version gates are intended to follow the
protocol discussed in the comment at the top of
upgrades/system_rbr_indexes.go
Writing to the lease table always occurs throught he kv API. The table
is read via the SQL api. The SQL uses of the system.lease table are
forwards compatible as long as they do not need to read the crdb_region.
Queries that interact with individual leases need to retrieve the
crdb_region and must consult the version gate.
Part of #94843
Release Note: None