Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
pdutil: use temp pause config (#592) (#596)
Browse files Browse the repository at this point in the history
* pdutil: use temp pause config

* refactor pdutil

* fix ci

* add pd version fail back

* fix ci

* fix ci

* fix unmarshal bool

* address comment

* fi

* add test case

* Apply suggestions from code review

Co-authored-by: kennytm <kennytm@gmail.com>

* address comment

* fix ci

* update comment

* update comment

* Update pkg/pdutil/pd.go

Co-authored-by: kennytm <kennytm@gmail.com>

* address comment

* change convoluted logic

* resume config by set ttlSecond to 0

* test pause config

* fix failpoint

* update test

* fix test

Co-authored-by: luancheng <luancheng@pingcap.com>
Co-authored-by: kennytm <kennytm@gmail.com>
  • Loading branch information
3 people authored Nov 25, 2020
1 parent 6001023 commit b5c73bb
Show file tree
Hide file tree
Showing 4 changed files with 188 additions and 116 deletions.
5 changes: 2 additions & 3 deletions cmd/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"go.uber.org/zap"

berrors "github.com/pingcap/br/pkg/errors"
"github.com/pingcap/br/pkg/pdutil"
"github.com/pingcap/br/pkg/restore"
"github.com/pingcap/br/pkg/rtree"
"github.com/pingcap/br/pkg/task"
Expand Down Expand Up @@ -367,10 +366,10 @@ func setPDConfigCommand() *cobra.Command {
}
defer mgr.Close()

if err := mgr.UpdatePDScheduleConfig(ctx, pdutil.DefaultPDCfg); err != nil {
if err := mgr.UpdatePDScheduleConfig(ctx); err != nil {
return errors.Annotate(err, "fail to update PD merge config")
}
log.Info("add pd configs succeed", zap.Any("config", pdutil.DefaultPDCfg))
log.Info("add pd configs succeed")
return nil
},
}
Expand Down
Loading

0 comments on commit b5c73bb

Please sign in to comment.