Skip to content

Commit aeaa401

Browse files
craig[bot]tbg
andcommitted
Merge #153332
153332: roachtest: verbose raft logging in follower reads tests r=tbg a=tbg In the linked failure below, the test fails due to what looks like a slow failover on a system range. Since I can only see that there was a >10s lag between proposing and applying a lease, naturally I'm curious what happened at the raft leadership and lease level. Hopefully this verbose logging will be helpful to diagnose future occurrences, should there be any (a lot changed on master and the failure is on an older branch). Closes #153245. Epic: none Co-authored-by: Tobias Grieger <[email protected]>
2 parents 96f9f14 + ffdeb5d commit aeaa401

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pkg/cmd/roachtest/tests/follower_reads.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ import (
4343
"github.com/stretchr/testify/require"
4444
)
4545

46+
func followerReadsVerboseRaftStartOpts() option.StartOpts {
47+
opts := option.DefaultStartOpts()
48+
// This verbose logging can help us reason about failures that seem related
49+
// to an unusually long failover process, such as #153245.
50+
opts.RoachprodOpts.ExtraArgs = append(opts.RoachprodOpts.ExtraArgs,
51+
"--vmodule=raft=2,support_manager=2,replica_range_lease=2,requester_state=3,supporter_state=3")
52+
return opts
53+
}
54+
4655
func registerFollowerReads(r registry.Registry) {
4756
register := func(
4857
survival survivalGoal, locality localitySetting, rc readConsistency, insufficientQuorum bool,
@@ -67,7 +76,7 @@ func registerFollowerReads(r registry.Registry) {
6776
if c.Cloud() == spec.GCE && c.Spec().Arch == vm.ArchARM64 {
6877
t.Skip("arm64 in GCE is available only in us-central1")
6978
}
70-
c.Start(ctx, t.L(), option.DefaultStartOpts(), install.MakeClusterSettings())
79+
c.Start(ctx, t.L(), followerReadsVerboseRaftStartOpts(), install.MakeClusterSettings())
7180
topology := topologySpec{
7281
multiRegion: true,
7382
locality: locality,

0 commit comments

Comments
 (0)