Skip to content

Commit d85be4c

Browse files
Merge branch 'master' into return_status_in_hb
2 parents 013bbb9 + 79882a7 commit d85be4c

File tree

17 files changed

+386
-357
lines changed

17 files changed

+386
-357
lines changed

Diff for: server/api/config.go

+5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828

2929
"github.com/pingcap/errcode"
3030
"github.com/pingcap/errors"
31+
"github.com/pingcap/failpoint"
3132
"github.com/pingcap/log"
3233

3334
"github.com/tikv/pd/pkg/errs"
@@ -411,6 +412,10 @@ func (h *confHandler) SetScheduleConfig(w http.ResponseWriter, r *http.Request)
411412
// @Success 200 {object} sc.ReplicationConfig
412413
// @Router /config/replicate [get]
413414
func (h *confHandler) GetReplicationConfig(w http.ResponseWriter, r *http.Request) {
415+
failpoint.Inject("getReplicationConfigFailed", func(v failpoint.Value) {
416+
code := v.(int)
417+
h.rd.JSON(w, code, "get config failed")
418+
})
414419
if h.svr.IsServiceIndependent(constant.SchedulingServiceName) &&
415420
r.Header.Get(apiutil.XForbiddenForwardToMicroserviceHeader) != "true" {
416421
cfg, err := h.getSchedulingServerConfig()

0 commit comments

Comments
 (0)