From 7427143b1fb1a12d5d7042e76d9d6ac39bebdbb1 Mon Sep 17 00:00:00 2001 From: Neil Shen Date: Thu, 23 Feb 2023 10:23:06 +0800 Subject: [PATCH] cdc/api/v2: add missing scheduler config (#8346) close pingcap/tiflow#8345 --- cdc/api/v2/model.go | 3 +++ cdc/api/v2/model_test.go | 6 ++++++ 2 files changed, 9 insertions(+) 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