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

roachtest: add c2c/multiregion/SameRegions/kv0 roachtest #110638

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

msbutler
Copy link
Collaborator

This patch adds a new c2c roachtest that spins up multiregion source and destination clusters, constrains the kv database to the us-east1-b region, and asserts that the replicated span configuration enforces the regional constraint on the destination cluster during replication.

Informs #109059

Release note: None

@msbutler msbutler requested review from a team as code owners September 14, 2023 12:46
@msbutler msbutler self-assigned this Sep 14, 2023
@msbutler msbutler requested review from rachitgsrivastava and DarrylWong and removed request for a team, rachitgsrivastava and DarrylWong September 14, 2023 12:46
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

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

Just some minor comments/questions.

return defaultWorkloadDriver(workloadCtx, setup, c, kv)
}

// checkRegionalConstraints checks that the kv table is constrained to the
// expected locality.
func (kv replicateKV) checkRegionalConstraints(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if we'll need to retry this in the future in case it takes some time for KV to enforce the constraints. I assume that right now we are assuming the test runs long enough that it really ought to be done by the time the test complete.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hmmmm good question. For now, I'm inclined to not add retry behavior. If this specific test fails because it does not replicate the regional constraints properly after 10 minutes, I'd like to know that. I fear that adding retry behavior could hide a bug. If this test starts to flake, I'll reconsider the logic here.

pkg/cmd/roachtest/tests/cluster_to_cluster.go Outdated Show resolved Hide resolved
This patch adds a new c2c roachtest that spins up multiregion source and
destination clusters, constrains the kv database to the us-east1-b region, and
asserts that the replicated span configuration enforces the regional constraint
on the destination cluster during replication.

Informs cockroachdb#109059

Release note: None
@msbutler msbutler force-pushed the butler-c2c-mr-roachtest branch from 5d91b69 to c00eac5 Compare September 14, 2023 14:29
@msbutler
Copy link
Collaborator Author

TFTR!!

bors r=stevendanna

@craig
Copy link
Contributor

craig bot commented Sep 14, 2023

Build succeeded:

@craig craig bot merged commit 58b28b5 into cockroachdb:master Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants