Skip to content

Commit

Permalink
roachtest: improve logging in gossip/chaos/nodes=9 further
Browse files Browse the repository at this point in the history
Informs cockroachdb#124828.
Informs cockroachdb#126077.

Release note: None
  • Loading branch information
nvanbenschoten authored and asg0451 committed Jun 25, 2024
1 parent e1f4ac8 commit 673fefa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/cmd/roachtest/tests/gossip.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,17 @@ SELECT node_id
}

waitForGossip := func(deadNode int) {
t.Status("waiting for gossip to exclude dead node %d", deadNode)
t.Status(fmt.Sprintf("waiting for gossip to exclude dead node %d", deadNode))
start := timeutil.Now()
for {
t.L().Printf("checking if gossip excludes dead node %d\n", deadNode)
t.L().Printf("checking if gossip excludes dead node %d (%.0fs)\n",
deadNode, timeutil.Since(start).Seconds())
if gossipOK(start, deadNode) {
return
}
time.Sleep(time.Second)
const sleepDur = 1 * time.Second
t.L().Printf("sleeping for %s (%.0fs)\n", sleepDur, timeutil.Since(start).Seconds())
time.Sleep(sleepDur)
}
}

Expand Down

0 comments on commit 673fefa

Please sign in to comment.