Skip to content

Commit e390c70

Browse files
committed
kvserver,kvnemesis: enable more lock reliability testing
Release note: None Epic: none
1 parent 6f11231 commit e390c70

File tree

2 files changed

+9
-22
lines changed

2 files changed

+9
-22
lines changed

pkg/kv/kvnemesis/kvnemesis_test.go

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -337,21 +337,14 @@ func TestKVNemesisMultiNode_BufferedWrites(t *testing.T) {
337337
defer log.Scope(t).Close(t)
338338

339339
testKVNemesisImpl(t, kvnemesisTestCfg{
340-
numNodes: 3,
341-
numSteps: defaultNumSteps,
342-
concurrency: 5,
343-
seedOverride: 0,
344-
// TODO(#145458): Until #145458 is fixed reduce the
345-
// rate of lost writes by avoiding lease transfers and
346-
// merges and also turning off error injection.
347-
invalidLeaseAppliedIndexProb: 0.0,
348-
injectReproposalErrorProb: 0.0,
340+
numNodes: 3,
341+
numSteps: defaultNumSteps,
342+
concurrency: 5,
343+
seedOverride: 0,
344+
invalidLeaseAppliedIndexProb: 0.2,
345+
injectReproposalErrorProb: 0.2,
349346
assertRaftApply: true,
350347
bufferedWriteProb: 0.70,
351-
testGeneratorConfig: func(g *GeneratorConfig) {
352-
g.Ops.ChangeLease = ChangeLeaseConfig{}
353-
g.Ops.Merge = MergeConfig{}
354-
},
355348
testSettings: func(ctx context.Context, st *cluster.Settings) {
356349
kvcoord.BufferedWritesEnabled.Override(ctx, &st.SV, true)
357350
concurrency.UnreplicatedLockReliabilityLeaseTransfer.Override(ctx, &st.SV, true)
@@ -362,9 +355,7 @@ func TestKVNemesisMultiNode_BufferedWrites(t *testing.T) {
362355
}
363356

364357
// TestKVNemesisMultiNode_BufferedWritesNoPipelining turns on buffered
365-
// writes and turns off write pipelining. Turning off write pipelining
366-
// allows us to test the lock reliability features even without a fix
367-
// for #145458.
358+
// writes and turns off write pipelining.
368359
func TestKVNemesisMultiNode_BufferedWritesNoPipelining(t *testing.T) {
369360
defer leaktest.AfterTest(t)()
370361
defer log.Scope(t).Close(t)

pkg/kv/kvserver/concurrency/concurrency_manager.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ var UnreplicatedLockReliabilityLeaseTransfer = settings.RegisterBoolSetting(
131131
settings.SystemOnly,
132132
"kv.lock_table.unreplicated_lock_reliability.lease_transfer.enabled",
133133
"whether the replica should attempt to keep unreplicated locks during lease transfers",
134-
// TODO(#145458): We've disabled this by default to avoid flakes until the underlying bug is fixed.
135-
// metamorphic.ConstantWithTestBool("kv.lock_table.unreplicated_lock_reliability.lease_transfer.enabled", true),
136-
false,
134+
metamorphic.ConstantWithTestBool("kv.lock_table.unreplicated_lock_reliability.lease_transfer.enabled", false),
137135
)
138136

139137
// UnreplicatedLockReliabilityMerge controls whether the replica will
@@ -142,9 +140,7 @@ var UnreplicatedLockReliabilityMerge = settings.RegisterBoolSetting(
142140
settings.SystemOnly,
143141
"kv.lock_table.unreplicated_lock_reliability.merge.enabled",
144142
"whether the replica should attempt to keep unreplicated locks during range merges",
145-
// TODO(#145458): We've disabled this by default to avoid flakes until the underlying bug is fixed.
146-
// metamorphic.ConstantWithTestBool("kv.lock_table.unreplicated_lock_reliability.merge.enabled", true),
147-
false,
143+
metamorphic.ConstantWithTestBool("kv.lock_table.unreplicated_lock_reliability.merge.enabled", false),
148144
)
149145

150146
var MaxLockFlushSize = settings.RegisterByteSizeSetting(

0 commit comments

Comments
 (0)