Skip to content

Commit

Permalink
Merge #110659
Browse files Browse the repository at this point in the history
110659: rangefeed: metamorphic test option for rangefeed scheduler r=aliher1911 a=aliher1911

This commit adds metamorphic test option for rangefeed scheduler. It will randomly enable rangefeed scheduler. Default option is off.

Epic: none

Release note: None

Fixes: 110658

Co-authored-by: Oleg Afanasyev <oleg@cockroachlabs.com>
  • Loading branch information
craig[bot] and aliher1911 committed Sep 15, 2023
2 parents 1755d67 + dfbabdc commit 12d5378
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kv/kvserver/replica_rangefeed.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/settings"
"github.com/cockroachdb/cockroach/pkg/storage"
"github.com/cockroachdb/cockroach/pkg/storage/enginepb"
"github.com/cockroachdb/cockroach/pkg/util"
"github.com/cockroachdb/cockroach/pkg/util/admission"
"github.com/cockroachdb/cockroach/pkg/util/admission/admissionpb"
"github.com/cockroachdb/cockroach/pkg/util/envutil"
Expand Down Expand Up @@ -79,14 +80,13 @@ var RangeFeedSmearInterval = settings.RegisterDurationSetting(

// RangeFeedUseScheduler controls type of rangefeed processor is used to process
// raft updates and sends updates to clients.
// TODO(oleg): add metamorphic variable for processor type selection.
var RangeFeedUseScheduler = settings.RegisterBoolSetting(
settings.SystemOnly,
"kv.rangefeed.scheduler.enabled",
"use shared fixed pool of workers for all range feeds instead of a "+
"worker per range (worker pool size is determined by "+
"COCKROACH_RANGEFEED_SCHEDULER_WORKERS env variable)",
false,
util.ConstantWithMetamorphicTestBool("kv_rangefeed_scheduler_enabled", false),
)

// RangefeedSchedulerDisabled is a kill switch for scheduler based rangefeed
Expand Down

0 comments on commit 12d5378

Please sign in to comment.