Skip to content

Commit 51c044e

Browse files
committed
kvserver: instrument TestPromoteNonVoterInAddVoter
1 parent 16dc236 commit 51c044e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

pkg/kv/kvserver/replicate_queue_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2151,6 +2151,28 @@ func TestPromoteNonVoterInAddVoter(t *testing.T) {
21512151
scope := log.Scope(t)
21522152
defer scope.Close(t)
21532153

2154+
// Add some debugging helpful for #134383, where the zone config update that
2155+
// should lead to down-replication is simply "ignored" and it's unclear who
2156+
// is to blame.
2157+
// `store=2` unconditionally logs changed spanconfigs in
2158+
// `spanconfigstore/store.go` and `reconciler=3` logs incoming updates from
2159+
// the rangefeed on the zone configs table. You'll need to look at the
2160+
// complete logs (not just the default log) and search for "test setting ZONE
2161+
// survival configuration" to find the start of the interesting bit. In
2162+
// passing runs, this shows the AUTO SPAN RECONCILIATION job acting on a new
2163+
// SQL update, changing the span configs (which should register on all nodes),
2164+
// and subsequent replication changes. In failing runs, it will be interesting
2165+
// which prefix of events remains.
2166+
{
2167+
old := log.GetVModule()
2168+
changed := "store=2,reconciler=3"
2169+
if old != "" {
2170+
changed = old + "," + changed
2171+
}
2172+
require.NoError(t, log.SetVModule(changed))
2173+
defer func() { _ = log.SetVModule(old) }()
2174+
}
2175+
21542176
// This test is slow under stress/race and can time out when upreplicating /
21552177
// rebalancing to ensure all stores have the same range count initially, due
21562178
// to slow heartbeats.

0 commit comments

Comments
 (0)