diff --git a/pkg/kv/kvnemesis/kvnemesis_test.go b/pkg/kv/kvnemesis/kvnemesis_test.go index 1095ff7afdc2..b98b53fd021d 100644 --- a/pkg/kv/kvnemesis/kvnemesis_test.go +++ b/pkg/kv/kvnemesis/kvnemesis_test.go @@ -365,6 +365,14 @@ func testKVNemesisImpl(t *testing.T, cfg kvnemesisTestCfg) { if config.NumReplicas > cfg.numNodes { config.NumReplicas = cfg.numNodes } + if cfg.invalidLeaseAppliedIndexProb > 0 { + // Merge requests issue a subsume request, which uses the lease applied + // index to freeze the range and force flush to the frozen index. Injecting + // invalid lease applied indices will cause the merge to fail on the + // subsume. + config.Ops.Merge.MergeIsSplit = 0 + config.Ops.Merge.MergeNotSplit = 0 + } logger := newTBridge(t) env := &Env{SQLDBs: sqlDBs, Tracker: tr, L: logger} failures, err := RunNemesis(ctx, rng, env, config, cfg.concurrency, cfg.numSteps, dbs...) diff --git a/pkg/kv/kvpb/api.go b/pkg/kv/kvpb/api.go index 61c3d79cbf8a..228a3dddf1b7 100644 --- a/pkg/kv/kvpb/api.go +++ b/pkg/kv/kvpb/api.go @@ -2113,7 +2113,7 @@ func (r *RefreshRangeRequest) flags() flag { return isRead | isTxn | isRange | updatesTSCache } -func (*SubsumeRequest) flags() flag { return isRead | isAlone | updatesTSCache } +func (*SubsumeRequest) flags() flag { return isWrite | isAlone | updatesTSCache } func (*RangeStatsRequest) flags() flag { return isRead } func (*QueryResolvedTimestampRequest) flags() flag { return isRead | isRange | requiresClosedTSOlderThanStorageSnapshot