roachtest: fix configureGCPolicies to use system connection for zone config#169762
roachtest: fix configureGCPolicies to use system connection for zone config#169762cockroach-teamcity wants to merge 1 commit intocockroachdb:masterfrom
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
I don't think this works: the the bank DB only exists in the tenant where we created / run it, so if the cluster does that in a main tenant instead of the system tenant, trying to configure a zone on bank in system tenant is just going to fail since there is no bank db there |
| // to the amount of MVCC history. We set a shorter GC TTL for the bank | ||
| // database to bound the full backup durations. | ||
| // | ||
| // CONFIGURE ZONE is not supported in virtual clusters, so we use the |
There was a problem hiding this comment.
I don't think this works: the the bank DB only exists in the tenant where we created / run it, so if the cluster does that in a main tenant instead of the system tenant, trying to configure a zone on bank in system tenant is just going to fail since there is no bank db there
There was a problem hiding this comment.
maybe we should just only try to configure the zone on >24.1?
…config
The `configureGCPolicies` function in the mixed-version backup test
was using `CommonTestUtils.Exec` to run `ALTER DATABASE bank CONFIGURE
ZONE USING gc.ttlseconds = ...`. In shared-process deployment mode,
`CommonTestUtils` connects through the default service, which is the
virtual cluster (tenant). Since `CONFIGURE ZONE` is not supported
within virtual clusters, this caused the test to fail with:
pq: unimplemented: operation is unsupported within a virtual cluster
Fix this by using `h.System.Exec()` instead, which always connects
through the system tenant where zone configuration is allowed.
Resolves: cockroachdb#169309
Epic: none
Release note: None
Generated by Claude Code Auto-Solver
Co-Authored-By: Claude <noreply@anthropic.com>
|
[autosolve-response] I've addressed the review comments and pushed updates. Changes made: Please review the updated code. |
751e57e to
aac913a
Compare
| // zone configs must be explicitly enabled for virtual clusters. | ||
| if h.IsMultitenant() && !h.Context().FromVersion.AtLeast(mixedversion.TenantsAndSystemAlignedSettingsVersion) { | ||
| for _, name := range []string{ | ||
| "sql.virtual_cluster.feature_access.zone_configs.enabled", |
There was a problem hiding this comment.
how confident are we that this will make the line below work on old versions?
What about just skipping the zone config on older versions that don't support it?
The
configureGCPoliciesfunction in the mixed-version backup testwas using
CommonTestUtils.Execto runALTER DATABASE bank CONFIGURE ZONE USING gc.ttlseconds = .... In shared-process deployment mode,CommonTestUtilsconnects through the default service, which is thevirtual cluster (tenant). Since
CONFIGURE ZONEis not supportedwithin virtual clusters, this caused the test to fail with:
Fix this by using
h.System.Exec()instead, which always connectsthrough the system tenant where zone configuration is allowed.
Resolves: #169309
Epic: none
Release note: None
Generated by Claude Code Auto-Solver
Co-Authored-By: Claude noreply@anthropic.com
This PR was auto-generated by issue-autosolve using Claude Code.
Please review carefully before approving.