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

logictest: add multiregion configuration #55784

Merged
merged 1 commit into from
Oct 21, 2020

Conversation

otan
Copy link
Contributor

@otan otan commented Oct 20, 2020

Add a logictest configuration that has three regions, with three
nodes in three different AZs.

Release note: None

@otan otan requested a review from ajstorm October 20, 2020 21:08
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@otan
Copy link
Contributor Author

otan commented Oct 20, 2020

can't seem to add @cockroachdb/multiregion as reviewers, but here's a CC.

@otan otan requested a review from a team October 20, 2020 21:19
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.

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


pkg/sql/logictest/logic.go, line 642 at r1 (raw file):

	{
		name:              "multiregion",
		numNodes:          9,

Seems like it could be error prone to have the map below depend on this size. Is there some way we can generate regions (and az's) below to match whatever number is up here? I'm worried that someone will change this number, say to 15, and we'll have a bunch of nodes without localities set.


pkg/sql/logictest/logic.go, line 647 at r1 (raw file):

			1: {
				Tiers: []roachpb.Tier{
					{Key: "region", Value: "test"},

I'd think a more realistic setup would be to have 3 nodes in each region, with three different availability zones. Also, I'm thinking it might be best to have the regions be "-" delimited and the az's be either numeric or chars to match what AWS, GCP and Azure do.

Copy link
Contributor Author

@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.

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


pkg/sql/logictest/logic.go, line 642 at r1 (raw file):

Previously, ajstorm wrote…

Seems like it could be error prone to have the map below depend on this size. Is there some way we can generate regions (and az's) below to match whatever number is up here? I'm worried that someone will change this number, say to 15, and we'll have a bunch of nodes without localities set.

i can deliberately rename to multiregion-9node to avoid this issue. i can also throw an assert.


pkg/sql/logictest/logic.go, line 647 at r1 (raw file):

Previously, ajstorm wrote…

I'd think a more realistic setup would be to have 3 nodes in each region, with three different availability zones. Also, I'm thinking it might be best to have the regions be "-" delimited and the az's be either numeric or chars to match what AWS, GCP and Azure do.

works for me. the spec had the space.

@otan otan force-pushed the multiregion_test branch 3 times, most recently from c524079 to 0b9f8a0 Compare October 21, 2020 19:28
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.

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


pkg/sql/logictest/logic.go, line 642 at r1 (raw file):

Previously, otan (Oliver Tan) wrote…

i can deliberately rename to multiregion-9node to avoid this issue. i can also throw an assert.

Both of those sound good.

Add a logictest configuration that has three regions, with three
nodes in three different AZs.

Release note: None
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.

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajstorm)

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.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

@ajstorm
Copy link
Collaborator

ajstorm commented Oct 21, 2020

LGTM

@otan
Copy link
Contributor Author

otan commented Oct 21, 2020

thanks!

bors r=ajstorm

@craig
Copy link
Contributor

craig bot commented Oct 21, 2020

Build succeeded:

@craig craig bot merged commit 40b7942 into cockroachdb:master Oct 21, 2020
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.

3 participants