cli,democluster: defer simulated latency until after cluster setup#92231
Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom Nov 23, 2022
Merged
cli,democluster: defer simulated latency until after cluster setup#92231craig[bot] merged 2 commits intocockroachdb:masterfrom
craig[bot] merged 2 commits intocockroachdb:masterfrom
Conversation
Member
f571a78 to
26a99fc
Compare
rafiss
approved these changes
Nov 22, 2022
Collaborator
rafiss
left a comment
There was a problem hiding this comment.
this is great to have, lgtm!
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @ajwerner)
pkg/testutils/serverutils/regionlatency/region_latencies.go line 117 at r1 (raw file):
// RoundTripPairs are pairs of round-trip latency between regions. type RoundTripPairs map[Pair]time.Duration
nit: should the value-type be RoundTripLatency?
…g latency We'll want to leverage these helpers in some tests to measure behavior under simulated latency. Release note: None
Cluster creation and tenant setup is chatty. That's an okay thing: we don't really care about cluster creation being that slow in general. In the case of demo when we want to simulate latency and use tenants, it was particularly painful. Starting the 9 tenants would take many minutes. This patch alleviates this problem by keeping latency between the simulated nodes low until just before we pass control to the user. Fixes cockroachdb#76305 Release note (cli change): `cockroach demo --global` will now start up more quickly. The latency which will be injected is not injected until after the initial cluster is set up internally.
26a99fc to
137b27b
Compare
ajwerner
commented
Nov 22, 2022
Contributor
Author
ajwerner
left a comment
There was a problem hiding this comment.
TFTR!
bors r+
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @rafiss)
pkg/testutils/serverutils/regionlatency/region_latencies.go line 117 at r1 (raw file):
Previously, rafiss (Rafi Shamim) wrote…
nit: should the value-type be
RoundTripLatency?
Done.
Contributor
|
Build failed (retrying...): |
Contributor
|
Build failed (retrying...): |
Contributor
|
Build succeeded: |
Collaborator
|
Nice. Thanks for getting to this @ajwerner! |
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.
democluster,serverutils/regionlatency,rpc: extract code for simulating latency
We'll want to leverage these helpers in some tests to measure behavior under
simulated latency.
cli,democluster: defer simulated latency until after cluster setup
Cluster creation and tenant setup is chatty. That's an okay thing: we don't
really care about cluster creation being that slow in general. In the case of
demo when we want to simulate latency and use tenants, it was particularly
painful. Starting the 9 tenants would take many minutes. This patch alleviates
this problem by keeping latency between the simulated nodes low until just
before we pass control to the user.
Fixes #76305
Release note (cli change):
cockroach demo --globalwill now start up morequickly. The latency which will be injected is not injected until after the
initial cluster is set up internally.