-
Notifications
You must be signed in to change notification settings - Fork 4k
crosscluster/physical: add reader tenant system table id offset setting #153284
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
Conversation
ce3ce80
to
d98bb07
Compare
looks like tc stress run was interrupted. treating as flake. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fqazi reviewed 11 of 14 files at r1, 4 of 4 files at r3, 2 of 2 files at r4, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @dt and @jeffswenson)
pkg/server/node.go
line 458 at r3 (raw file):
defaultZoneConfig *zonepb.ZoneConfig, defaultSystemZoneConfig *zonepb.ZoneConfig, ) bootstrap.MetadataSchema { return bootstrap.MakeMetadataSchema(keys.SystemSQLCodec, defaultZoneConfig, defaultSystemZoneConfig, 0)
Nit: /* dynamicSystemTableIDOffset */
d98bb07
to
7ccc91d
Compare
counter-nit: I hate those comments. I'd consider adding |
alternatively: rename |
This patch adds an option to MakeSetadataSchema to offset the dynamically allocated system table ids. So, if the caller sets this to say 1000, the vc will still have ids 0-49, but then ids 1050,1051, etc. A future patch will leverage this option during PCR reader tenant creation to ensure that replicating user table ids never collide with the reader tenant's system table ids. Informs cockroachdb#152909 Release note: none
This patch adds the private physical_cluster_replication.reader_system_table_id_offset setting, which a pcr customer can set on the destination system tenant to some very large number, like 1,000,000, which will bootstrap the reader tenant with dynamically allocated system table ids to be offset+i. This setting can be set when the reader tenant fails to start up because a source table id collides with a system table id. Informs cockroachdb#152909 Release note: none
7ccc91d
to
0429616
Compare
@dt i went with the const NoOffset approach. I decided to not create a new BootstrapTenant call since there are only 2 callers. |
Epic: none Release note: none
I've modified the PCR roachtests to metamorphically bump the reader tenant system table Ids. i'm hesitant to bump the reader tenant ids in general for now, as i gotta backport this change and i don't want to introduce flakes. |
bors r=fqazi |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 008a5f4 to blathers/backport-release-24.3-153284: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 24.3.x failed. See errors above. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 008a5f4 to blathers/backport-release-25.2-153284: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 25.2.x failed. See errors above. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 0429616 to blathers/backport-release-25.3-153284: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 25.3.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
crosscluster/physical: add reader tenant system table id offset setting
This patch adds the private
physical_cluster_replication.reader_system_table_id_offset setting, which a pcr
customer can set on the destination system tenant to some very large number,
like 1,000,000, which will bootstrap the reader tenant with dynamically
allocated system table ids to be offset+i. This setting can be set when the
reader tenant fails to start up because a source table id collides with a
system table id.
Informs #152909
Release note: none
catalog/bootstrap: add option to offset ids during system table creation
This patch adds an option to MakeSetadataSchema to offset the dynamically
allocated system table ids. So, if the caller sets this to say 1000, the vc
will still have ids 0-49, but then ids 1050,1051, etc.
A future patch will leverage this option during PCR reader tenant creation to
ensure that replicating user table ids never collide with the reader tenant's
system table ids.
Informs #152909
Release note: none