-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
testcluster: always wait for full replication #9624
Conversation
This makes it considerably less likely that database creation will cause replication to stall in our benchmarks. The underlying cause remains unknown. Updates #8081.
Well, this appears to make matters worse (by surfacing more instances of this bug). cc @petermattis ( |
I'll take a look tomorrow as I have a school event to attend tonight. |
@@ -177,6 +177,12 @@ func StartTestCluster(t testing.TB, nodes int, args base.TestClusterArgs) *TestC | |||
tc.stopper.AddCloser(stop.CloserFn(tc.stopServers)) | |||
|
|||
tc.waitForStores(t) | |||
|
|||
// TODO(tamird): consider removing this when #8081 is addressed. | |||
if err := tc.WaitForFullReplication(); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will never complete if args.ReplicationMode == base.ReplicationManual
, which it is in TestLeaseInfoRequest
. Try:
if args.ReplicationMode == base.ReplicationAuto {
if err := tc.WaitForFullReplication(); err != nil {
t.Fatal(err)
}
}
This makes it considerably less likely that database creation will cause
replication to stall in our benchmarks.
The underlying cause remains unknown.
Updates #8081.
This change is