Skip to content
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

demo: fix --global option #58466

Merged
merged 2 commits into from
Jan 8, 2021
Merged

demo: fix --global option #58466

merged 2 commits into from
Jan 8, 2021

Conversation

jordanlewis
Copy link
Member

The --global option broke somewhere during the 20.2 cycle. This patch
revives it. --global simulates geo-latencies between nodes. Best used
with --global --geo-partitioned-replicas.

Release note (cli change): fix cockroach demo --global from crashing
with "didn't get expected magic bytes header".

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jordanlewis
Copy link
Member Author

Still no tests for this, sorry.

Copy link
Member

@nvanbenschoten nvanbenschoten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Now that we handle the ArtificialLatencyMap knob in grpcDialOptions, do we still need to also handle the knob in grpcDialRaw? Seems like the latter calls the former.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajstorm and @nvanbenschoten)

@otan
Copy link
Contributor

otan commented Jan 6, 2021

Tests?!

Rename https://github.com/cockroachdb/cockroach/blob/master/pkg/cli/interactive_tests/test_demo_global.tcl.disabled to test_demo_global.tcl and run expect -f pkg/cli/interactive_tests/test_demo_global.tcl ./cockroach!

Copy link
Collaborator

@ajstorm ajstorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm with Nathan - Nice!

Any chance you could add this to your PR? I wasn't able to test with the --global flag when I built add node, and realized in testing your change that the error message doesn't print out correctly.

index bebc3b0abf..27785de1b7 100644
--- a/pkg/cli/sql.go
+++ b/pkg/cli/sql.go
@@ -562,7 +562,7 @@ func (c *cliState) handleDemoAddNode(cmd []string, nextState, errState cliStateE
     }
 
     if demoCtx.simulateLatency {
-        fmt.Printf("add command is not supported in --global configurations")
+        fmt.Printf("add command is not supported in --global configurations\n")
         return nextState
     }```

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajstorm)

@ajstorm ajstorm self-requested a review January 7, 2021 13:55
jordanlewis and others added 2 commits January 8, 2021 09:49
The --global option broke somewhere during the 20.2 cycle. This patch
revives it. --global simulates geo-latencies between nodes. Best used
with `--global --geo-partitioned-replicas`.

Release note (cli change): fix cockroach demo --global from crashing
with "didn't get expected magic bytes header".
@jordanlewis jordanlewis requested a review from a team as a code owner January 7, 2021 22:51
Copy link
Contributor

@otan otan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

bors r+

@craig
Copy link
Contributor

craig bot commented Jan 7, 2021

Build failed:

@otan
Copy link
Contributor

otan commented Jan 8, 2021

bors r+

@craig
Copy link
Contributor

craig bot commented Jan 8, 2021

Build failed:

@otan
Copy link
Contributor

otan commented Jan 8, 2021

that's a flake

bors r+

@craig
Copy link
Contributor

craig bot commented Jan 8, 2021

Build succeeded:

@craig craig bot merged commit 41372ad into cockroachdb:master Jan 8, 2021
@jordanlewis jordanlewis deleted the fix-global branch January 8, 2021 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants