Skip to content

Commit

Permalink
Merge branch 'master' into fix-4737
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Mar 17, 2022
2 parents 5d8aadb + 766e568 commit 13749f4
Show file tree
Hide file tree
Showing 29 changed files with 588 additions and 35 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ require (
github.com/pingcap/errcode v0.3.0
github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c
github.com/pingcap/failpoint v0.0.0-20200702092429-9f69995143ce
github.com/pingcap/kvproto v0.0.0-20220302110454-c696585a961b
github.com/pingcap/kvproto v0.0.0-20220309094445-a78dc9fdb89a
github.com/pingcap/log v0.0.0-20210906054005-afc726e70354
github.com/pingcap/sysutil v0.0.0-20211208032423-041a72e5860d
github.com/pingcap/tidb-dashboard v0.0.0-20220117082709-e8076b5c79ba
github.com/pingcap/tidb-dashboard v0.0.0-20220316134154-e88e27120168
github.com/prometheus/client_golang v1.1.0
github.com/prometheus/common v0.6.0
github.com/sasha-s/go-deadlock v0.2.0
Expand Down
15 changes: 8 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ github.com/AlekSi/gocov-xml v1.0.0/go.mod h1:J0qYeZ6tDg4oZubW9mAAgxlqw39PDfoEkzB
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
Expand Down Expand Up @@ -288,8 +287,9 @@ github.com/joomcode/errorx v1.0.1/go.mod h1:kgco15ekB6cs+4Xjzo7SPeXzx38PbJzBwbnu
github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
Expand Down Expand Up @@ -357,8 +357,9 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/montanaflynn/stats v0.5.0 h1:2EkzeTSqBB4V4bJwWrt5gIIrZmpJBcoIRGS2kWLgzmk=
github.com/montanaflynn/stats v0.5.0/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
Expand Down Expand Up @@ -398,17 +399,17 @@ github.com/pingcap/failpoint v0.0.0-20200702092429-9f69995143ce h1:Y1kCxlCtlPTMt
github.com/pingcap/failpoint v0.0.0-20200702092429-9f69995143ce/go.mod h1:w4PEZ5y16LeofeeGwdgZB4ddv9bLyDuIX+ljstgKZyk=
github.com/pingcap/kvproto v0.0.0-20191211054548-3c6b38ea5107/go.mod h1:WWLmULLO7l8IOcQG+t+ItJ3fEcrL5FxF0Wu+HrMy26w=
github.com/pingcap/kvproto v0.0.0-20200411081810-b85805c9476c/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI=
github.com/pingcap/kvproto v0.0.0-20220302110454-c696585a961b h1:/OL63rEIcCEivpgTLCkhxVbO3RMxSuHtsKWSgDwS6oY=
github.com/pingcap/kvproto v0.0.0-20220302110454-c696585a961b/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI=
github.com/pingcap/kvproto v0.0.0-20220309094445-a78dc9fdb89a h1:0ZnJ8JPtPVGG3qF1G9Kz0NYDEj8BraNEJeQlmwUF6BA=
github.com/pingcap/kvproto v0.0.0-20220309094445-a78dc9fdb89a/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI=
github.com/pingcap/log v0.0.0-20191012051959-b742a5d432e9/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8=
github.com/pingcap/log v0.0.0-20200511115504-543df19646ad/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8=
github.com/pingcap/log v0.0.0-20210625125904-98ed8e2eb1c7/go.mod h1:8AanEdAHATuRurdGxZXBz0At+9avep+ub7U1AGYLIMM=
github.com/pingcap/log v0.0.0-20210906054005-afc726e70354 h1:SvWCbCPh1YeHd9yQLksvJYAgft6wLTY1aNG81tpyscQ=
github.com/pingcap/log v0.0.0-20210906054005-afc726e70354/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4=
github.com/pingcap/sysutil v0.0.0-20211208032423-041a72e5860d h1:k3/APKZjXOyJrFy8VyYwRlZhMelpD3qBLJNsw3bPl/g=
github.com/pingcap/sysutil v0.0.0-20211208032423-041a72e5860d/go.mod h1:7j18ezaWTao2LHOyMlsc2Dg1vW+mDY9dEbPzVyOlaeM=
github.com/pingcap/tidb-dashboard v0.0.0-20220117082709-e8076b5c79ba h1:72Rig0+kBaX8uU68LvB1cWIvu78UksZgQk3ELwvpdbI=
github.com/pingcap/tidb-dashboard v0.0.0-20220117082709-e8076b5c79ba/go.mod h1:4hk/3owVGWdvI9Kx6yCqqvM1T5PVgwyQNyMQxD3rwfc=
github.com/pingcap/tidb-dashboard v0.0.0-20220316134154-e88e27120168 h1:ngN2NLXRRWifJ0FQJSSWlfCzsz3ZXOAqVrgIa6IHIrM=
github.com/pingcap/tidb-dashboard v0.0.0-20220316134154-e88e27120168/go.mod h1:Hc2LXf5Vs+KwyegHd6osyZ2+LfaVSfWEwuR86SNg7tk=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand Down
1 change: 1 addition & 0 deletions server/api/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ func (s *testConfigSuite) TestConfigPDServer(c *C) {
c.Assert(sc.MetricStorage, Equals, "")
c.Assert(sc.DashboardAddress, Equals, "auto")
c.Assert(sc.FlowRoundByDigit, Equals, int(3))
c.Assert(sc.MinResolvedTSPersistenceInterval, Equals, typeutil.NewDuration(0))
c.Assert(sc.MaxResetTSGap.Duration, Equals, 24*time.Hour)
}

Expand Down
57 changes: 57 additions & 0 deletions server/api/min_resolved_ts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright 2022 TiKV Project Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package api

import (
"net/http"

"github.com/tikv/pd/server"
"github.com/unrolled/render"
)

type minResolvedTSHandler struct {
svr *server.Server
rd *render.Render
}

func newMinResolvedTSHandler(svr *server.Server, rd *render.Render) *minResolvedTSHandler {
return &minResolvedTSHandler{
svr: svr,
rd: rd,
}
}

// NOTE: This type is exported by HTTP API. Please pay more attention when modifying it.
type minResolvedTS struct {
MinResolvedTS uint64 `json:"min_resolved_ts"`
}

// @Tags minresolvedts
// @Summary Get cluster-level min resolved ts.
// @Produce json
// @Success 200 {array} minResolvedTS
// @Failure 500 {string} string "PD server failed to proceed the request."
// @Router /min-resolved-ts [get]
func (h *minResolvedTSHandler) Get(w http.ResponseWriter, r *http.Request) {
storage := h.svr.GetStorage()
value, err := storage.LoadMinResolvedTS()
if err != nil {
h.rd.JSON(w, http.StatusInternalServerError, err.Error())
return
}
h.rd.JSON(w, http.StatusOK, minResolvedTS{
MinResolvedTS: value,
})
}
66 changes: 66 additions & 0 deletions server/api/min_resolved_ts_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Copyright 2022 TiKV Project Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package api

import (
"fmt"

. "github.com/pingcap/check"
"github.com/pingcap/failpoint"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/tikv/pd/pkg/apiutil"
"github.com/tikv/pd/server"
)

var _ = Suite(&testMinResolvedTSSuite{})

type testMinResolvedTSSuite struct {
svr *server.Server
cleanup cleanUpFunc
urlPrefix string
}

func (s *testMinResolvedTSSuite) SetUpSuite(c *C) {
c.Assert(failpoint.Enable("github.com/tikv/pd/server/highFrequencyClusterJobs", `return(true)`), IsNil)
s.svr, s.cleanup = mustNewServer(c)
mustWaitLeader(c, []*server.Server{s.svr})

addr := s.svr.GetAddr()
s.urlPrefix = fmt.Sprintf("%s%s/api/v1", addr, apiPrefix)

mustBootstrapCluster(c, s.svr)
mustPutStore(c, s.svr, 1, metapb.StoreState_Up, metapb.NodeState_Serving, nil)
}

func (s *testMinResolvedTSSuite) TearDownSuite(c *C) {
s.cleanup()
}

func (s *testMinResolvedTSSuite) TestMinResolvedTS(c *C) {
url := s.urlPrefix + "/min-resolved-ts"
storage := s.svr.GetStorage()
min := uint64(233)
storage.SaveMinResolvedTS(min)
result := &minResolvedTS{
MinResolvedTS: min,
}
res, err := testDialClient.Get(url)
c.Assert(err, IsNil)
defer res.Body.Close()
listResp := &minResolvedTS{}
err = apiutil.ReadJSON(res.Body, listResp)
c.Assert(err, IsNil)
c.Assert(listResp, DeepEquals, result)
}
4 changes: 4 additions & 0 deletions server/api/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@ func createRouter(prefix string, svr *server.Server) *mux.Router {
registerFunc(apiRouter, "/gc/safepoint", serviceGCSafepointHandler.GetGCSafePoint, setMethods("GET"), setAuditBackend(localLog))
registerFunc(apiRouter, "/gc/safepoint/{service_id}", serviceGCSafepointHandler.DeleteGCSafePoint, setMethods("DELETE"), setAuditBackend(localLog))

// min resolved ts API
minResolvedTSHandler := newMinResolvedTSHandler(svr, rd)
registerFunc(apiRouter, "/min-resolved-ts", minResolvedTSHandler.Get, setMethods("GET"))

// unsafe admin operation API
unsafeOperationHandler := newUnsafeOperationHandler(svr, rd)
registerFunc(clusterRouter, "/admin/unsafe/remove-failed-stores",
Expand Down
15 changes: 14 additions & 1 deletion server/api/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (s *testScheduleSuite) TestAPI(c *C) {
resp := make(map[string]interface{})
listURL := fmt.Sprintf("%s%s%s/%s/list", s.svr.GetAddr(), apiPrefix, server.SchedulerConfigHandlerPath, name)
c.Assert(readJSON(testDialClient, listURL, &resp), IsNil)
c.Assert(resp["batch"], Equals, 5.0)
c.Assert(resp["batch"], Equals, 4.0)
dataMap := make(map[string]interface{})
dataMap["batch"] = 3
updateURL := fmt.Sprintf("%s%s%s/%s/config", s.svr.GetAddr(), apiPrefix, server.SchedulerConfigHandlerPath, name)
Expand All @@ -140,6 +140,19 @@ func (s *testScheduleSuite) TestAPI(c *C) {
c.Assert(code, Equals, 200)
})
c.Assert(err, IsNil)
// update invalidate batch
dataMap = map[string]interface{}{}
dataMap["batch"] = 100
body, err = json.Marshal(dataMap)
c.Assert(err, IsNil)
err = postJSON(testDialClient, updateURL, body, func(res []byte, code int) {
c.Assert(code, Equals, 400)
})
c.Assert(err, NotNil)
c.Assert(err.Error(), Equals, "\"invalid batch size which should be an integer between 1 and 10\"\n")
resp = make(map[string]interface{})
c.Assert(readJSON(testDialClient, listURL, &resp), IsNil)
c.Assert(resp["batch"], Equals, 3.0)
// empty body
err = postJSON(testDialClient, updateURL, nil, func(res []byte, code int) {
c.Assert(code, Equals, 500)
Expand Down
2 changes: 1 addition & 1 deletion server/api/service_gc_safepoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (s *testServiceGCSafepointSuite) TearDownSuite(c *C) {
s.cleanup()
}

func (s *testServiceGCSafepointSuite) TestRegionStats(c *C) {
func (s *testServiceGCSafepointSuite) TestServiceGCSafepoint(c *C) {
sspURL := s.urlPrefix + "/gc/safepoint"

storage := s.svr.GetStorage()
Expand Down
66 changes: 65 additions & 1 deletion server/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package cluster
import (
"context"
"fmt"
"math"
"net/http"
"strconv"
"sync"
Expand Down Expand Up @@ -250,16 +251,19 @@ func (c *RaftCluster) Start(s Server) error {
c.regionStats = statistics.NewRegionStatistics(c.opt, c.ruleManager)
c.limiter = NewStoreLimiter(s.GetPersistOptions())
c.unsafeRecoveryController = newUnsafeRecoveryController(cluster)
minResolvedTSPersistenceInterval := c.opt.GetMinResolvedTSPersistenceInterval()

c.wg.Add(5)
c.wg.Add(6)
go c.runCoordinator()
failpoint.Inject("highFrequencyClusterJobs", func() {
backgroundJobInterval = 100 * time.Microsecond
minResolvedTSPersistenceInterval = 1 * time.Microsecond
})
go c.runBackgroundJobs(backgroundJobInterval)
go c.runStatsBackgroundJobs()
go c.syncRegions()
go c.runReplicationMode()
go c.runMinResolvedTSJob(minResolvedTSPersistenceInterval)
c.running = true

return nil
Expand Down Expand Up @@ -1650,6 +1654,66 @@ func (c *RaftCluster) RemoveStoreLimit(storeID uint64) {
log.Error("persist store limit meet error", errs.ZapError(err))
}

// GetMinResolvedTS returns the min resolved ts of all stores.
func (c *RaftCluster) GetMinResolvedTS() uint64 {
c.RLock()
defer c.RUnlock()
if !c.isInitialized() {
return math.MaxUint64
}
min := uint64(math.MaxUint64)
for _, s := range c.GetStores() {
if !core.IsAvailableForMinResolvedTS(s) {
continue
}
if min > s.GetMinResolvedTS() {
min = s.GetMinResolvedTS()
}
}
return min
}

// SetMinResolvedTS sets up a store with min resolved ts.
func (c *RaftCluster) SetMinResolvedTS(storeID, minResolvedTS uint64) error {
c.Lock()
defer c.Unlock()

store := c.GetStore(storeID)
if store == nil {
return errs.ErrStoreNotFound.FastGenByArgs(storeID)
}

newStore := store.Clone(
core.SetMinResolvedTS(minResolvedTS),
)

return c.putStoreLocked(newStore)
}

func (c *RaftCluster) runMinResolvedTSJob(saveInterval time.Duration) {
defer c.wg.Done()
if saveInterval == 0 {
return
}
defer logutil.LogPanic()
ticker := time.NewTicker(saveInterval)
defer ticker.Stop()
for {
select {
case <-c.ctx.Done():
log.Info("min resolved ts background jobs has been stopped")
return
case <-ticker.C:
minResolvedTS := c.GetMinResolvedTS()
if minResolvedTS != math.MaxUint64 {
c.Lock()
c.storage.SaveMinResolvedTS(minResolvedTS)
c.Unlock()
}
}
}
}

// SetStoreLimit sets a store limit for a given type and rate.
func (c *RaftCluster) SetStoreLimit(storeID uint64, typ storelimit.Type, ratePerMin float64) error {
old := c.opt.GetScheduleConfig().Clone()
Expand Down
18 changes: 12 additions & 6 deletions server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,13 @@ const (

defaultLeaderPriorityCheckInterval = time.Minute

defaultUseRegionStorage = true
defaultTraceRegionFlow = true
defaultFlowRoundByDigit = 3 // KB
maxTraceFlowRoundByDigit = 5 // 0.1 MB
defaultMaxResetTSGap = 24 * time.Hour
defaultKeyType = "table"
defaultUseRegionStorage = true
defaultTraceRegionFlow = true
defaultFlowRoundByDigit = 3 // KB
maxTraceFlowRoundByDigit = 5 // 0.1 MB
defaultMaxResetTSGap = 24 * time.Hour
defaultMinResolvedTSPersistenceInterval = 0
defaultKeyType = "table"

defaultStrictlyMatchLabel = false
defaultEnablePlacementRules = true
Expand Down Expand Up @@ -1102,6 +1103,8 @@ type PDServerConfig struct {
TraceRegionFlow bool `toml:"trace-region-flow" json:"trace-region-flow,string,omitempty"`
// FlowRoundByDigit used to discretization processing flow information.
FlowRoundByDigit int `toml:"flow-round-by-digit" json:"flow-round-by-digit"`
// MinResolvedTSPersistenceInterval is the interval to save the min resolved ts.
MinResolvedTSPersistenceInterval typeutil.Duration `toml:"min-resolved-ts-persistence-interval" json:"min-resolved-ts-persistence-interval"`
}

func (c *PDServerConfig) adjust(meta *configMetaData) error {
Expand All @@ -1124,6 +1127,9 @@ func (c *PDServerConfig) adjust(meta *configMetaData) error {
if !meta.IsDefined("flow-round-by-digit") {
adjustInt(&c.FlowRoundByDigit, defaultFlowRoundByDigit)
}
if !meta.IsDefined("min-resolved-ts-persistence-interval") {
adjustDuration(&c.MinResolvedTSPersistenceInterval, defaultMinResolvedTSPersistenceInterval)
}
c.migrateConfigurationFromFile(meta)
return c.Validate()
}
Expand Down
5 changes: 5 additions & 0 deletions server/config/persist_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,11 @@ func (o *PersistOptions) CheckLabelProperty(typ string, labels []*metapb.StoreLa
return false
}

// GetMinResolvedTSPersistenceInterval gets the interval for PD to save min resolved ts.
func (o *PersistOptions) GetMinResolvedTSPersistenceInterval() time.Duration {
return o.GetPDServerConfig().MinResolvedTSPersistenceInterval.Duration
}

const ttlConfigPrefix = "/config/ttl"

// SetTTLData set temporary configuration
Expand Down
Loading

0 comments on commit 13749f4

Please sign in to comment.