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 committed Jun 24, 2024
1 parent b56e743 commit 3206499
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 3206499

Please sign in to comment.