sql: enable tenant testing for more tests#140447
Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom Feb 11, 2025
Merged
sql: enable tenant testing for more tests#140447craig[bot] merged 2 commits intocockroachdb:masterfrom
craig[bot] merged 2 commits intocockroachdb:masterfrom
Conversation
Member
Contributor
Author
|
There are still a lot of these usages left, but to keep the PR relatively easier for review I'll put it in next one. |
shubhamdhama
commented
Feb 4, 2025
This comment was marked as outdated.
This comment was marked as outdated.
3967b7b to
c1f7079
Compare
To achieve this, this PR reduces the usage of `createTestServerParams` by replacing it with `createTestServerParamsAllowTenants`. The changes are mostly straightforward, including replacing hardcoded `keys.SystemSQLCodec` with `server.Codec()`, and using `server.StorageLayer()`/`server.SystemLayer()` where the test is specific to the system tenant. Informs: cockroachdb#140446 Epic: CRDB-38970 Release note: None
The previous comment implied that `ApplicationLayer()` could randomly return either the system tenant's or a secondary tenant's interface. This change clarifies that behavior.
c1f7079 to
b13bd15
Compare
rafiss
approved these changes
Feb 11, 2025
Collaborator
rafiss
left a comment
There was a problem hiding this comment.
lgtm! thank you for improving these tests!
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @cthumuluru-crdb)
Contributor
Author
|
bors r=rafiss |
Contributor
Author
|
Thanks for the review, Rafi. |
Contributor
shubhamdhama
added a commit
to shubhamdhama/cockroach
that referenced
this pull request
Feb 12, 2025
Previously all tests in this file were disabled for multitenancy. (Continuation of cockroachdb#140447 for `schema_changer_test.go`) Informs: cockroachdb#140446 Epic: CRDB-38970 Release note: None
Contributor
|
LGTM. Thanks, @shubhamdhama! |
craig bot
pushed a commit
that referenced
this pull request
Feb 14, 2025
141213: sql: enable tenant testing for schema_changer tests r=cthumuluru-crdb,rafiss a=shubhamdhama Previously all tests in this file were disabled for multitenancy. (Continuation of #140447 for `schema_changer_test.go`) Informs: #140446 Epic: CRDB-38970 Release note: None 141392: sqlstats: Reuse sessionphase.Times on stats collector r=xinhaoz a=xinhaoz StatsCollector.Reset shows up in sqlstats section of cpu/mem profiles. This seemed to mostly be allocations of new session.PhaseTimes objects. This commit avoids new allocations of session.PhaseTimes when resetting the stats collector. Epic: none Release note: None ``` name old time/op new time/op delta Sysbench/SQL/3node/oltp_read_write-24 13.2ms ± 2% 13.0ms ± 1% -1.69% (p=0.001 n=10+10) ParallelSysbench/SQL/3node/oltp_read_write-24 1.22ms ± 3% 1.22ms ± 1% ~ (p=0.315 n=10+10) name old errs/op new errs/op delta Sysbench/SQL/3node/oltp_read_write-24 0.00 0.00 ~ (all equal) ParallelSysbench/SQL/3node/oltp_read_write-24 0.01 ±20% 0.01 ±52% ~ (p=0.231 n=9+10) name old alloc/op new alloc/op delta Sysbench/SQL/3node/oltp_read_write-24 2.18MB ± 1% 2.18MB ± 1% ~ (p=0.666 n=9+9) ParallelSysbench/SQL/3node/oltp_read_write-24 2.03MB ± 1% 2.03MB ± 1% ~ (p=0.971 n=10+10) name old allocs/op new allocs/op delta Sysbench/SQL/3node/oltp_read_write-24 10.5k ± 2% 10.5k ± 2% ~ (p=0.529 n=10+10) ParallelSysbench/SQL/3node/oltp_read_write-24 9.16k ± 2% 9.17k ± 2% ~ (p=0.853 n=10+10) ``` 141446: backup: fix panic on encrypted incremental after non-encrypted backup r=msbutler a=kev-cao When attempting an encrypted backup on a non-encrypted backup chain, an error should be surfaced to the user indicating an error and inability to do so. Due to a missing error check, this currently panics. Epic: none Release note: None Co-authored-by: Shubham Dhama <shubham.dhama@cockroachlabs.com> Co-authored-by: Xin Hao Zhang <xzhang@cockroachlabs.com> Co-authored-by: Kevin Cao <kevin.cao@cockroachlabs.com>
annrpom
pushed a commit
to annrpom/cockroach
that referenced
this pull request
Feb 20, 2025
Previously all tests in this file were disabled for multitenancy. (Continuation of cockroachdb#140447 for `schema_changer_test.go`) Informs: cockroachdb#140446 Epic: CRDB-38970 Release note: None
shubhamdhama
added a commit
to shubhamdhama/cockroach
that referenced
this pull request
Feb 21, 2025
(Stacked on cockroachdb#141490.) This PR continues the work from cockroachdb#140447, replacing occurrences of `createTestServerParams` with `createTestServerParamsAllowTenants` to enable tenant testing in these tests. Informs: cockroachdb#140446 Epic: CRDB-38970 Release note: None
craig bot
pushed a commit
that referenced
this pull request
Feb 21, 2025
141604: sql: increase tenant testing coverage r=rafiss,yuzefovich a=shubhamdhama This PR continues the work from #140447, replacing occurrences of `createTestServerParams` with `createTestServerParamsAllowTenants` to enable tenant testing in these tests. Informs: #140446 Epic: CRDB-38970 Release note: None 141833: upgrades: report progress during 25.1 upgrade jobs backfill r=dt a=dt Release note: none. Epic: none. Co-authored-by: Shubham Dhama <shubham.dhama@cockroachlabs.com> Co-authored-by: David Taylor <tinystatemachine@gmail.com>
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.
To achieve this, this PR reduces the usage of
createTestServerParamsby replacing it withcreateTestServerParamsAllowTenants. The changes are mostly straightforward, including replacing hardcodedkeys.SystemSQLCodecwithserver.Codec(), and usingserver.StorageLayer()/server.SystemLayer()where the test is specific to the system tenant.Informs: #140446
Epic: CRDB-38970
Release note: None