diff --git a/cdc/api/v2/model.go b/cdc/api/v2/model.go index 747de799204..3b0c9f71207 100644 --- a/cdc/api/v2/model.go +++ b/cdc/api/v2/model.go @@ -387,6 +387,9 @@ func GetDefaultReplicaConfig() *ReplicaConfig { FlushIntervalInMs: config.DefaultFlushIntervalInMs, Storage: "", }, + Scheduler: &ChangefeedSchedulerConfig{ + RegionPerSpan: config.GetDefaultReplicaConfig().Scheduler.RegionPerSpan, + }, } } diff --git a/cdc/api/v2/model_test.go b/cdc/api/v2/model_test.go index 406a9bc8d42..ef00bd37fed 100644 --- a/cdc/api/v2/model_test.go +++ b/cdc/api/v2/model_test.go @@ -24,6 +24,12 @@ import ( "github.com/stretchr/testify/require" ) +func TestDefaultReplicaConfig(t *testing.T) { + t.Parallel() + cfg := GetDefaultReplicaConfig() + require.NotNil(t, cfg.Scheduler) +} + func TestToAPIReplicaConfig(t *testing.T) { cfg := config.GetDefaultReplicaConfig() cfg.EnableOldValue = false