tikv / tikv/pd

deprecate the old scheduler config

Open
#8,474 5 comments 1 reaction 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
1.2k
Forks
783
Avg merge
5d 21h
Merged PRs (30d)
36

Description

## Enhancement Task

We can consider removing these functions

```golang
type SchedulerConfigProvider interface {
....
IsSchedulerDisabled(types.CheckerSchedulerType) bool
AddSchedulerCfg(types.CheckerSchedulerType, []string)
RemoveSchedulerCfg(types.CheckerSchedulerType)
Persist(endpoint.ConfigStorage) error
....

GetScheduleConfig() *ScheduleConfig
SetScheduleConfig(*ScheduleConfig)
}
```

from this interface.

https://github.com/tikv/pd/blob/3ce31ef4b3e81cbf77271cc29384454f8b3d0a8a/pkg/schedule/config/config_provider.go#L45-L75

here is some background:

- v2.x all scheduler configs are stored in the global config `Config.SchedulerConfig`
- v3.x let the scheduler has it's own config, that's store in another key/value in etcd https://github.com/tikv/pd/pull/1733

To ensure compatibility, both configurations are retained, and we can now clean up the old one. However, there is one problem that needs to be solved: the default scheduler state needs special handling.

The old config https://github.com/tikv/pd/blob/master/pkg/schedule/config/config.go#L557

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.