Skip to content

Commit

Permalink
config: fix the bug that the dynamic config cannot be obtained when t…
Browse files Browse the repository at this point in the history
…he PD starts later than the dashboard server (#842)

Signed-off-by: Zheng Xiangsheng <[email protected]>
  • Loading branch information
HunDunDM authored Jan 8, 2021
1 parent 4f41dd6 commit 99d5d70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/config/dynamic_config_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ import (
const (
DynamicConfigPath = "/dashboard/dynamic_config"
Timeout = time.Second
MaxCheckInterval = 5 * time.Second
MaxCheckInterval = 30 * time.Second
MaxElapsedTime = 0 // never stop if MaxElapsedTime == 0
)

var (
Expand Down Expand Up @@ -71,6 +72,7 @@ func (m *DynamicConfigManager) Start(ctx context.Context) error {
var dc *DynamicConfig
ebo := backoff.NewExponentialBackOff()
ebo.MaxInterval = MaxCheckInterval
ebo.MaxElapsedTime = MaxElapsedTime
bo := backoff.WithContext(ebo, ctx)

if err := backoff.Retry(func() error {
Expand Down

0 comments on commit 99d5d70

Please sign in to comment.