Function with cyclomatic complexity higher than threshold GO-R1005
Anti-pattern
Minor
2 occurrences in this check
func adjust has a cyclomatic complexity of 18 with "high" risk
534	BlockSafePointV1 bool `toml:"block-safe-point-v1" json:"block-safe-point-v1,string"`
535}
536
537func (c *PDServerConfig) adjust(meta *configutil.ConfigMetaData) error {538	configutil.AdjustDuration(&c.MaxResetTSGap, defaultMaxResetTSGap)
539	if !meta.IsDefined("use-region-storage") {
540		c.UseRegionStorage = defaultUseRegionStorage
func Adjust has a cyclomatic complexity of 21 with "high" risk
355}
356
357// Adjust is used to adjust the PD configurations.
358func (c *Config) Adjust(meta *toml.MetaData, reloading bool) error {359	configMetaData := configutil.NewConfigMetadata(meta)
360	if err := configMetaData.CheckUndecoded(); err != nil {
361		c.WarningMsgs = append(c.WarningMsgs, err.Error())