Skip to content

Commit

Permalink
rangefeed: metamorphic test option for rangefeed scheduler
Browse files Browse the repository at this point in the history
This commit adds metamorphic test option for rangefeed scheduler.
It will randomly enable rangefeed scheduler. Default option is off.

Epic: none

Release note: None
  • Loading branch information
aliher1911 committed Sep 14, 2023
1 parent 0cde11b commit dfbabdc
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),
)

func init() {
Expand Down

0 comments on commit dfbabdc

Please sign in to comment.