sql: add comment for auto-rollback#142079
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Feb 27, 2025
Merged
Conversation
A comment has been added to explain logic added in cockroachdb#140160. Release note: None
|
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Member
Contributor
Author
|
TFTR! bors r+ |
Contributor
msbutler
added a commit
to msbutler/cockroach
that referenced
this pull request
Feb 27, 2025
We already set the default rf to 1 for non system ranges. This patch removes a schema change run to set num replicas for system ranges to 1 and sets the system ranges rf to 1 by default instead. This patch reduces the test runtime of server startup by abour 15%, post initialization: ``` ❯ benchdiff --old 281a729 --new c14e2c15b8697e62a8916cd5c60a1be43c54fdf1 ./pkg/server -r BenchmarkTestServerStartup -c 15 --preview -b old: 281a729 Merge cockroachdb#142062 cockroachdb#142079 new: c14e2c1 testserver: set default rf to 1 for single node se args: benchdiff "--old" "281a7294cf1360446177ceed1e25e141d19e0c6e" "--new" "c14e2c15b8697e62a8916cd5c60a1be43c54fdf1" "./pkg/server" "-r" "BenchmarkTestServerStartup" "-c" "15" "--preview" "-b" name old time/op new time/op delta TestServerStartup/ExternalTenant-24 390ms ±10% 320ms ±26% -18.06% (p=0.000 n=15+15) TestServerStartup/SharedTenant-24 390ms ±16% 328ms ± 7% -15.85% (p=0.000 n=15+14) TestServerStartup/SystemTenantOnly-24 386ms ±13% 336ms ±12% -13.01% (p=0.000 n=15+15) name old alloc/op new alloc/op delta TestServerStartup/SystemTenantOnly-24 133MB ± 0% 119MB ± 0% -10.21% (p=0.000 n=15+15) TestServerStartup/ExternalTenant-24 133MB ± 0% 119MB ± 1% -10.19% (p=0.000 n=12+15) TestServerStartup/SharedTenant-24 133MB ± 1% 119MB ± 1% -10.18% (p=0.000 n=15+14) name old allocs/op new allocs/op delta TestServerStartup/SystemTenantOnly-24 799k ± 0% 701k ± 0% -12.34% (p=0.000 n=15+15) TestServerStartup/SharedTenant-24 799k ± 0% 701k ± 0% -12.33% (p=0.000 n=15+15) TestServerStartup/ExternalTenant-24 799k ± 0% 701k ± 0% -12.29% (p=0.000 n=15+15) ``` Epic: none Release note: none
msbutler
added a commit
to msbutler/cockroach
that referenced
this pull request
Feb 27, 2025
We already set the default rf to 1 for non system ranges. This patch skips the schema change run to set num replicas for system ranges to 1 and sets the system ranges rf to 1 by default instead. This patch reduces the test runtime of server startup by abour 15%, post initialization: ``` ❯ benchdiff --old 281a729 --new c14e2c15b8697e62a8916cd5c60a1be43c54fdf1 ./pkg/server -r BenchmarkTestServerStartup -c 15 --preview -b old: 281a729 Merge cockroachdb#142062 cockroachdb#142079 new: c14e2c1 testserver: set default rf to 1 for single node se args: benchdiff "--old" "281a7294cf1360446177ceed1e25e141d19e0c6e" "--new" "c14e2c15b8697e62a8916cd5c60a1be43c54fdf1" "./pkg/server" "-r" "BenchmarkTestServerStartup" "-c" "15" "--preview" "-b" name old time/op new time/op delta TestServerStartup/ExternalTenant-24 390ms ±10% 320ms ±26% -18.06% (p=0.000 n=15+15) TestServerStartup/SharedTenant-24 390ms ±16% 328ms ± 7% -15.85% (p=0.000 n=15+14) TestServerStartup/SystemTenantOnly-24 386ms ±13% 336ms ±12% -13.01% (p=0.000 n=15+15) name old alloc/op new alloc/op delta TestServerStartup/SystemTenantOnly-24 133MB ± 0% 119MB ± 0% -10.21% (p=0.000 n=15+15) TestServerStartup/ExternalTenant-24 133MB ± 0% 119MB ± 1% -10.19% (p=0.000 n=12+15) TestServerStartup/SharedTenant-24 133MB ± 1% 119MB ± 1% -10.18% (p=0.000 n=15+14) name old allocs/op new allocs/op delta TestServerStartup/SystemTenantOnly-24 799k ± 0% 701k ± 0% -12.34% (p=0.000 n=15+15) TestServerStartup/SharedTenant-24 799k ± 0% 701k ± 0% -12.33% (p=0.000 n=15+15) TestServerStartup/ExternalTenant-24 799k ± 0% 701k ± 0% -12.29% (p=0.000 n=15+15) ``` Epic: none Release note: none
craig bot
pushed a commit
that referenced
this pull request
Feb 28, 2025
142108: testserver: set default rf to 1 for single node servers r=rafiss a=msbutler We already set the default rf to 1 for non system ranges. This patch skips a schema change run to set num replicas for system ranges to 1 and sets the system ranges rf to 1 by default instead. This patch reduces the test runtime of server startup by abour 15%, post initialization: ``` ❯ benchdiff --old 281a729 --new c14e2c15b8697e62a8916cd5c60a1be43c54fdf1 ./pkg/server -r BenchmarkTestServerStartup -c 15 --preview -b old: 281a729 Merge #142062 #142079 new: c14e2c1 testserver: set default rf to 1 for single node se args: benchdiff "--old" "281a7294cf1360446177ceed1e25e141d19e0c6e" "--new" "c14e2c15b8697e62a8916cd5c60a1be43c54fdf1" "./pkg/server" "-r" "BenchmarkTestServerStartup" "-c" "15" "--preview" "-b" name old time/op new time/op delta TestServerStartup/ExternalTenant-24 390ms ±10% 320ms ±26% -18.06% (p=0.000 n=15+15) TestServerStartup/SharedTenant-24 390ms ±16% 328ms ± 7% -15.85% (p=0.000 n=15+14) TestServerStartup/SystemTenantOnly-24 386ms ±13% 336ms ±12% -13.01% (p=0.000 n=15+15) name old alloc/op new alloc/op delta TestServerStartup/SystemTenantOnly-24 133MB ± 0% 119MB ± 0% -10.21% (p=0.000 n=15+15) TestServerStartup/ExternalTenant-24 133MB ± 0% 119MB ± 1% -10.19% (p=0.000 n=12+15) TestServerStartup/SharedTenant-24 133MB ± 1% 119MB ± 1% -10.18% (p=0.000 n=15+14) name old allocs/op new allocs/op delta TestServerStartup/SystemTenantOnly-24 799k ± 0% 701k ± 0% -12.34% (p=0.000 n=15+15) TestServerStartup/SharedTenant-24 799k ± 0% 701k ± 0% -12.33% (p=0.000 n=15+15) TestServerStartup/ExternalTenant-24 799k ± 0% 701k ± 0% -12.29% (p=0.000 n=15+15) ``` Epic: none Release note: none Co-authored-by: Michael Butler <butler@cockroachlabs.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.
A comment has been added to explain logic added in #140160.
Epic: None
Release note: None