Skip to content

Commit

Permalink
cdc/api/v2: add missing scheduler config (#8346)
Browse files Browse the repository at this point in the history
close #8345
  • Loading branch information
overvenus authored Feb 23, 2023
1 parent 77d2c22 commit 7427143
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cdc/api/v2/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ func GetDefaultReplicaConfig() *ReplicaConfig {
FlushIntervalInMs: config.DefaultFlushIntervalInMs,
Storage: "",
},
Scheduler: &ChangefeedSchedulerConfig{
RegionPerSpan: config.GetDefaultReplicaConfig().Scheduler.RegionPerSpan,
},
}
}

Expand Down
6 changes: 6 additions & 0 deletions cdc/api/v2/model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7427143

Please sign in to comment.