diff --git a/Makefile b/Makefile index 037aa64c3bc22..0062e330333c9 100644 --- a/Makefile +++ b/Makefile @@ -11,63 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -PROJECT=tidb -GOPATH ?= $(shell go env GOPATH) -P=8 - -# Ensure GOPATH is set before running build process. -ifeq "$(GOPATH)" "" - $(error Please set the environment variable GOPATH before running `make`) -endif -FAIL_ON_STDOUT := awk '{ print } END { if (NR > 0) { exit 1 } }' - -CURDIR := $(shell pwd) -path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH))):$(PWD)/tools/bin -export PATH := $(path_to_add):$(PATH) - -GO := GO111MODULE=on go -GOBUILD := $(GO) build $(BUILD_FLAG) -tags codes -GOBUILDCOVERAGE := GOPATH=$(GOPATH) cd tidb-server; $(GO) test -coverpkg="../..." -c . -GOTEST := $(GO) test -p $(P) -OVERALLS := GO111MODULE=on overalls -STATICCHECK := GO111MODULE=on staticcheck -TIDB_EDITION ?= Community - -# Ensure TIDB_EDITION is set to Community or Enterprise before running build process. -ifneq "$(TIDB_EDITION)" "Community" -ifneq "$(TIDB_EDITION)" "Enterprise" - $(error Please set the correct environment variable TIDB_EDITION before running `make`) -endif -endif - -ARCH := "`uname -s`" -LINUX := "Linux" -MAC := "Darwin" -PACKAGE_LIST := go list ./...| grep -vE "cmd" -PACKAGES ?= $$($(PACKAGE_LIST)) -PACKAGE_DIRECTORIES := $(PACKAGE_LIST) | sed 's|github.com/pingcap/$(PROJECT)/||' -FILES := $$(find $$($(PACKAGE_DIRECTORIES)) -name "*.go") - -FAILPOINT_ENABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|tools)" | xargs tools/bin/failpoint-ctl enable) -FAILPOINT_DISABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|tools)" | xargs tools/bin/failpoint-ctl disable) - -LDFLAGS += -X "github.com/pingcap/parser/mysql.TiDBReleaseVersion=$(shell git describe --tags --dirty --always)" -LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBBuildTS=$(shell date -u '+%Y-%m-%d %H:%M:%S')" -LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitHash=$(shell git rev-parse HEAD)" -LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitBranch=$(shell git rev-parse --abbrev-ref HEAD)" -LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBEdition=$(TIDB_EDITION)" - -TEST_LDFLAGS = -X "github.com/pingcap/tidb/config.checkBeforeDropLDFlag=1" -COVERAGE_SERVER_LDFLAGS = -X "github.com/pingcap/tidb/tidb-server.isCoverageServer=1" - -CHECK_LDFLAGS += $(LDFLAGS) ${TEST_LDFLAGS} - -TARGET = "" - -# VB = Vector Benchmark -VB_FILE = -VB_FUNC = - +include Makefile.common .PHONY: all clean test gotest server dev benchkv benchraw check checklist parser tidy ddltest @@ -207,17 +151,6 @@ tikv_integration_test: failpoint-enable $(GOTEST) ./store/tikv/. -with-tikv=true || { $(FAILPOINT_DISABLE); exit 1; } @$(FAILPOINT_DISABLE) -RACE_FLAG = -ifeq ("$(WITH_RACE)", "1") - RACE_FLAG = -race - GOBUILD = GOPATH=$(GOPATH) $(GO) build -endif - -CHECK_FLAG = -ifeq ("$(WITH_CHECK)", "1") - CHECK_FLAG = $(TEST_LDFLAGS) -endif - server: ifeq ($(TARGET), "") CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o bin/tidb-server tidb-server/main.go diff --git a/Makefile.common b/Makefile.common new file mode 100644 index 0000000000000..8885dc6c3a979 --- /dev/null +++ b/Makefile.common @@ -0,0 +1,80 @@ +# Copyright 2020 PingCAP, Inc. +# +# 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, +# See the License for the specific language governing permissions and +# limitations under the License. + +PROJECT=tidb +GOPATH ?= $(shell go env GOPATH) +P=8 + +# Ensure GOPATH is set before running build process. +ifeq "$(GOPATH)" "" + $(error Please set the environment variable GOPATH before running `make`) +endif +FAIL_ON_STDOUT := awk '{ print } END { if (NR > 0) { exit 1 } }' + +CURDIR := $(shell pwd) +path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH))):$(PWD)/tools/bin +export PATH := $(path_to_add):$(PATH) + +GO := GO111MODULE=on go +GOBUILD := $(GO) build $(BUILD_FLAG) -tags codes +GOBUILDCOVERAGE := GOPATH=$(GOPATH) cd tidb-server; $(GO) test -coverpkg="../..." -c . +GOTEST := $(GO) test -p $(P) +OVERALLS := GO111MODULE=on overalls +STATICCHECK := GO111MODULE=on staticcheck +TIDB_EDITION ?= Community + +# Ensure TIDB_EDITION is set to Community or Enterprise before running build process. +ifneq "$(TIDB_EDITION)" "Community" +ifneq "$(TIDB_EDITION)" "Enterprise" + $(error Please set the correct environment variable TIDB_EDITION before running `make`) +endif +endif + +ARCH := "`uname -s`" +LINUX := "Linux" +MAC := "Darwin" +PACKAGE_LIST := go list ./...| grep -vE "cmd|github.com\/pingcap\/tidb\/tests" +PACKAGES ?= $$($(PACKAGE_LIST)) +PACKAGE_DIRECTORIES := $(PACKAGE_LIST) | sed 's|github.com/pingcap/$(PROJECT)/||' +FILES := $$(find $$($(PACKAGE_DIRECTORIES)) -name "*.go") + +FAILPOINT_ENABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|tools)" | xargs tools/bin/failpoint-ctl enable) +FAILPOINT_DISABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|tools)" | xargs tools/bin/failpoint-ctl disable) + +LDFLAGS += -X "github.com/pingcap/parser/mysql.TiDBReleaseVersion=$(shell git describe --tags --dirty --always)" +LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBBuildTS=$(shell date -u '+%Y-%m-%d %H:%M:%S')" +LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitHash=$(shell git rev-parse HEAD)" +LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitBranch=$(shell git rev-parse --abbrev-ref HEAD)" +LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBEdition=$(TIDB_EDITION)" + +TEST_LDFLAGS = -X "github.com/pingcap/tidb/config.checkBeforeDropLDFlag=1" +COVERAGE_SERVER_LDFLAGS = -X "github.com/pingcap/tidb/tidb-server.isCoverageServer=1" + +CHECK_LDFLAGS += $(LDFLAGS) ${TEST_LDFLAGS} + +TARGET = "" + +# VB = Vector Benchmark +VB_FILE = +VB_FUNC = + +RACE_FLAG = +ifeq ("$(WITH_RACE)", "1") + RACE_FLAG = -race + GOBUILD = GOPATH=$(GOPATH) $(GO) build +endif + +CHECK_FLAG = +ifeq ("$(WITH_CHECK)", "1") + CHECK_FLAG = $(TEST_LDFLAGS) +endif diff --git a/config/config.go b/config/config.go index 4c5cd4e1720a4..9c94faa883d0b 100644 --- a/config/config.go +++ b/config/config.go @@ -119,7 +119,6 @@ type Config struct { ProxyProtocol ProxyProtocol `toml:"proxy-protocol" json:"proxy-protocol"` TiKVClient TiKVClient `toml:"tikv-client" json:"tikv-client"` Binlog Binlog `toml:"binlog" json:"binlog"` - CompatibleKillQuery bool `toml:"compatible-kill-query" json:"compatible-kill-query"` Plugin Plugin `toml:"plugin" json:"plugin"` PessimisticTxn PessimisticTxn `toml:"pessimistic-txn" json:"pessimistic-txn"` CheckMb4ValueInUTF8 bool `toml:"check-mb4-value-in-utf8" json:"check-mb4-value-in-utf8"` diff --git a/config/config.toml.example b/config/config.toml.example index d67d0c738a087..5de78c7433223 100644 --- a/config/config.toml.example +++ b/config/config.toml.example @@ -67,10 +67,6 @@ enable-batch-dml = false # Set system variable 'lower_case_table_names' lower-case-table-names = 2 -# Make "kill query" behavior compatible with MySQL. It's not recommend to -# turn on this option when TiDB server is behind a proxy. -compatible-kill-query = false - # check mb4 value in utf8 is used to control whether to check the mb4 characters when the charset is utf8. check-mb4-value-in-utf8 = true diff --git a/config/config_util.go b/config/config_util.go index 6922437cf1bcb..9734fe595d313 100644 --- a/config/config_util.go +++ b/config/config_util.go @@ -61,7 +61,6 @@ var ( "CheckMb4ValueInUTF8": {}, "EnableStreaming": {}, "TxnLocalLatches.Capacity": {}, - "CompatibleKillQuery": {}, "TreatOldVersionUTF8AsUTF8MB4": {}, "OpenTracing.Enable": {}, "PreparedPlanCache.Enabled": {}, diff --git a/ddl/ddl_test.go b/ddl/ddl_test.go index a05fd76b862d9..b4d3f245fa0b9 100644 --- a/ddl/ddl_test.go +++ b/ddl/ddl_test.go @@ -80,7 +80,7 @@ func TestT(t *testing.T) { conf.AlterPrimaryKey = true }) - _, err := infosync.GlobalInfoSyncerInit(context.Background(), "t", nil, true) + _, err := infosync.GlobalInfoSyncerInit(context.Background(), "t", func() uint64 { return 1 }, nil, true) if err != nil { t.Fatal(err) } diff --git a/distsql/request_builder.go b/distsql/request_builder.go index 944c56bd5200d..39fe8c7f1f2f8 100644 --- a/distsql/request_builder.go +++ b/distsql/request_builder.go @@ -247,6 +247,14 @@ func (builder *RequestBuilder) SetConcurrency(concurrency int) *RequestBuilder { return builder } +// SetTiDBServerID sets "TiDBServerID" for "kv.Request" +// ServerID is a unique id of TiDB instance among the cluster. +// See https://github.com/pingcap/tidb/blob/master/docs/design/2020-06-01-global-kill.md +func (builder *RequestBuilder) SetTiDBServerID(serverID uint64) *RequestBuilder { + builder.Request.TiDBServerID = serverID + return builder +} + // TableRangesToKVRanges converts table ranges to "KeyRange". func TableRangesToKVRanges(tid int64, ranges []*ranger.Range, fb *statistics.QueryFeedback) []kv.KeyRange { return TablesRangesToKVRanges([]int64{tid}, ranges, fb) diff --git a/docs/design/2020-06-01-global-kill.md b/docs/design/2020-06-01-global-kill.md new file mode 100644 index 0000000000000..61cc6b8504368 --- /dev/null +++ b/docs/design/2020-06-01-global-kill.md @@ -0,0 +1,73 @@ +# Global Kill + +- Author(s): [pingyu](https://github.com/pingyu) (Ping Yu) +- Last updated: 2020-10-25 +- Discussion at: https://github.com/pingcap/tidb/issues/8854 + +## Abstract + +This document introduces the design of global connection id, and the global `KILL ` based on it. + +## Background + +Currently connection ids are local to TiDB instances, which means that a `KILL x` must be directed to the correct instance, and can not safely be load balanced across the cluster, as discussed [here](https://github.com/pingcap/tidb/issues/8854). + +## Proposal + +To support "Global Kill", we need: +1. Global connection ids, which are unique among all TiDB instances. +2. Redirect `KILL x` to target TiDB instance, on which the connection `x` is running. +3. Support both 32 & 64 bits `connId`, to be compatible with legacy 32 bits clients. In this stage, we only design the 64 bits `connId`, and left a `markup` to distinguish between these two kinds. + +## Rationale + +#### 1. Structure of `connId` +##### 64 bits version +``` + 63 62 41 40 1 0 + +--+---------------------+--------------------------------------+------+ + | | serverId | local connId |markup| + |=0| (22b) | (40b) | =1 | + +--+---------------------+--------------------------------------+------+ +``` +##### 32 bits version +(To be discussed in another RFC) +``` + 31 1 0 + +-----------------------------+------+ + | ??? |markup| + | ??? | =0 | + +-----------------------------+------+ +``` + +#### 2. bit 63 +Bit 63 is always __ZERO__, making `connId` in range of non-negative int64, to be more friendly to exists codes, and some languages don't have primitive type `uint64`. + +#### 3. markup +- `markup == 0` indicates that the `connID` is just 32 bits long effectively, and high 32 bits should be all zeros. Compatible with legacy 32 bits clients. +- `markup == 1` indicates that the `connID` is 64 bits long. Incompatible with legacy 32 bits clients. +- `markup == 1` while __high 32 bits are zeros__, indicates that 32 bits truncation happens. See `Compatibility` section. + + +#### 4. serverId +`serverId` is selected RANDOMLY by each TiDB instance on startup, and the uniqueness is guaranteed by PD(etcd). `serverId` should be larger or equal to 1, to ensure that high 32 bits of `connId` is always non-zero, and make it possible to detect truncation. + +On failure (e.g. fail connecting to PD, or all `serverId` are unavailable), we block any new connection. + +`serverId` is kept by PD with a lease (defaults to 12 hours, long enough to avoid brutally killing any long-run SQL). If TiDB is disconnected to PD longer than half of the lease (defaults to 6 hours), all connections are killed, and no new connection is accepted, to avoid running with stale/incorrect `serverId`. On connection to PD restored, a new `serverId` is acquired before accepting new connection. + +On single TiDB instance without PD, a `serverId` of `1` is assigned. + +#### 5. local connId +`local connId` is allocated by each TiDB instance on establishing connections incrementally. + +Integer overflow is ignored at this stage, as `local connId` should be long enough. + +#### 6. global kill +On processing `KILL x` command, first extract `serverId` from `x`. Then if `serverId` aims to a remote TiDB instance, get the address from cluster info (see also [`CLUSTER_INFO`](https://docs.pingcap.com/tidb/stable/information-schema-cluster-info#cluster_info)), and redirect the command to it by "Coprocessor API" provided by the remote TiDB, along with the original user authentication. + +## Compatibility + +- Incompatible with legacy 32 bits clients. (According to some quick tests by now, MySQL client v8.0.19 supports `KILL` a connection with 64 bits `connId`, while `CTRL-C` does not, because it truncates the `connId` to 32 bits). A warning is set prompting that truncation happened, but user cannot see it, because `CTRL-C` is sent by a new connection in an instant. + +- [`KILL TIDB`](https://docs.pingcap.com/tidb/v4.0/sql-statement-kill) syntax and [`compatible-kill-query`](https://docs.pingcap.com/tidb/v4.0/tidb-configuration-file#compatible-kill-query) configuration item are deprecated. diff --git a/domain/domain.go b/domain/domain.go index 07bc616025336..ead025c032c9d 100644 --- a/domain/domain.go +++ b/domain/domain.go @@ -15,6 +15,9 @@ package domain import ( "context" + "fmt" + "math/rand" + "strconv" "sync" "sync/atomic" "time" @@ -32,6 +35,7 @@ import ( "github.com/pingcap/tidb/config" "github.com/pingcap/tidb/ddl" "github.com/pingcap/tidb/ddl/placement" + ddlutil "github.com/pingcap/tidb/ddl/util" "github.com/pingcap/tidb/domain/infosync" "github.com/pingcap/tidb/errno" "github.com/pingcap/tidb/infoschema" @@ -53,6 +57,7 @@ import ( "github.com/pingcap/tidb/util/logutil" "github.com/pingcap/tidb/util/sqlexec" "go.etcd.io/etcd/clientv3" + "go.etcd.io/etcd/clientv3/concurrency" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/keepalive" @@ -81,6 +86,10 @@ type Domain struct { statsUpdating sync2.AtomicInt32 cancel context.CancelFunc indexUsageSyncLease time.Duration + + serverID uint64 + serverIDSession *concurrency.Session + isLostConnectionToPD sync2.AtomicInt32 // !0: true, 0: false. } // loadInfoSchema loads infoschema at startTS into handle, usedSchemaVersion is the currently used @@ -683,6 +692,8 @@ func NewDomain(store kv.Storage, ddlLease time.Duration, statsLease time.Duratio return do } +const serverIDForStandalone = 1 // serverID for standalone deployment. + // Init initializes a domain. func (do *Domain) Init(ddlLease time.Duration, sysFactory func(*Domain) (pools.Resource, error)) error { perfschema.Init() @@ -759,7 +770,24 @@ func (do *Domain) Init(ddlLease time.Duration, sysFactory func(*Domain) (pools.R if err != nil { return err } - do.info, err = infosync.GlobalInfoSyncerInit(ctx, do.ddl.GetID(), do.etcdClient, skipRegisterToDashboard) + + if do.etcdClient != nil { + err := do.acquireServerID(ctx) + if err != nil { + logutil.BgLogger().Error("acquire serverID failed", zap.Error(err)) + do.isLostConnectionToPD.Set(1) // will retry in `do.serverIDKeeper` + } else { + do.isLostConnectionToPD.Set(0) + } + + do.wg.Add(1) + go do.serverIDKeeper() + } else { + // set serverID for standalone deployment to enable 'KILL'. + atomic.StoreUint64(&do.serverID, serverIDForStandalone) + } + + do.info, err = infosync.GlobalInfoSyncerInit(ctx, do.ddl.GetID(), do.ServerID, do.etcdClient, skipRegisterToDashboard) if err != nil { return err } @@ -1279,6 +1307,242 @@ func (do *Domain) NotifyUpdatePrivilege(ctx sessionctx.Context) { } } +// ServerID gets serverID. +func (do *Domain) ServerID() uint64 { + return atomic.LoadUint64(&do.serverID) +} + +// IsLostConnectionToPD indicates lost connection to PD or not. +func (do *Domain) IsLostConnectionToPD() bool { + return do.isLostConnectionToPD.Get() != 0 +} + +const ( + serverIDEtcdPath = "/tidb/server_id" + refreshServerIDRetryCnt = 3 + acquireServerIDRetryInterval = 300 * time.Millisecond + acquireServerIDTimeout = 10 * time.Second + retrieveServerIDSessionTimeout = 10 * time.Second +) + +var ( + // serverIDTTL should be LONG ENOUGH to avoid barbarically killing an on-going long-run SQL. + serverIDTTL = 12 * time.Hour + // serverIDTimeToKeepAlive is the interval that we keep serverID TTL alive periodically. + serverIDTimeToKeepAlive = 5 * time.Minute + // serverIDTimeToCheckPDConnectionRestored is the interval that we check connection to PD restored (after broken) periodically. + serverIDTimeToCheckPDConnectionRestored = 10 * time.Second + // lostConnectionToPDTimeout is the duration that when TiDB cannot connect to PD excceeds this limit, + // we realize the connection to PD is lost utterly, and server ID acquired before should be released. + // Must be SHORTER than `serverIDTTL`. + lostConnectionToPDTimeout = 6 * time.Hour +) + +var ( + ldflagIsGlobalKillTest = "0" // 1:Yes, otherwise:No. + ldflagServerIDTTL = "10" // in seconds. + ldflagServerIDTimeToKeepAlive = "1" // in seconds. + ldflagServerIDTimeToCheckPDConnectionRestored = "1" // in seconds. + ldflagLostConnectionToPDTimeout = "5" // in seconds. +) + +func initByLDFlagsForGlobalKill() { + if ldflagIsGlobalKillTest == "1" { + var ( + i int + err error + ) + + if i, err = strconv.Atoi(ldflagServerIDTTL); err != nil { + panic("invalid ldflagServerIDTTL") + } + serverIDTTL = time.Duration(i) * time.Second + + if i, err = strconv.Atoi(ldflagServerIDTimeToKeepAlive); err != nil { + panic("invalid ldflagServerIDTimeToKeepAlive") + } + serverIDTimeToKeepAlive = time.Duration(i) * time.Second + + if i, err = strconv.Atoi(ldflagServerIDTimeToCheckPDConnectionRestored); err != nil { + panic("invalid ldflagServerIDTimeToCheckPDConnectionRestored") + } + serverIDTimeToCheckPDConnectionRestored = time.Duration(i) * time.Second + + if i, err = strconv.Atoi(ldflagLostConnectionToPDTimeout); err != nil { + panic("invalid ldflagLostConnectionToPDTimeout") + } + lostConnectionToPDTimeout = time.Duration(i) * time.Second + + logutil.BgLogger().Info("global_kill_test is enabled", zap.Duration("serverIDTTL", serverIDTTL), + zap.Duration("serverIDTimeToKeepAlive", serverIDTimeToKeepAlive), + zap.Duration("serverIDTimeToCheckPDConnectionRestored", serverIDTimeToCheckPDConnectionRestored), + zap.Duration("lostConnectionToPDTimeout", lostConnectionToPDTimeout)) + } +} + +func (do *Domain) retrieveServerIDSession(ctx context.Context) (*concurrency.Session, error) { + if do.serverIDSession != nil { + return do.serverIDSession, nil + } + + // `etcdClient.Grant` needs a shortterm timeout, to avoid blocking if connection to PD lost, + // while `etcdClient.KeepAlive` should be longterm. + // So we separately invoke `etcdClient.Grant` and `concurrency.NewSession` with leaseID. + childCtx, cancel := context.WithTimeout(ctx, retrieveServerIDSessionTimeout) + resp, err := do.etcdClient.Grant(childCtx, int64(serverIDTTL.Seconds())) + cancel() + if err != nil { + logutil.BgLogger().Error("retrieveServerIDSession.Grant fail", zap.Error(err)) + return nil, err + } + leaseID := resp.ID + + session, err := concurrency.NewSession(do.etcdClient, + concurrency.WithLease(leaseID), concurrency.WithContext(context.Background())) + if err != nil { + logutil.BgLogger().Error("retrieveServerIDSession.NewSession fail", zap.Error(err)) + return nil, err + } + do.serverIDSession = session + return session, nil +} + +func (do *Domain) acquireServerID(ctx context.Context) error { + atomic.StoreUint64(&do.serverID, 0) + + session, err := do.retrieveServerIDSession(ctx) + if err != nil { + return err + } + + for { + randServerID := rand.Int63n(int64(util.MaxServerID)) + 1 // get a random serverID: [1, MaxServerID] + key := fmt.Sprintf("%s/%v", serverIDEtcdPath, randServerID) + cmp := clientv3.Compare(clientv3.CreateRevision(key), "=", 0) + value := "0" + + childCtx, cancel := context.WithTimeout(ctx, acquireServerIDTimeout) + txn := do.etcdClient.Txn(childCtx) + t := txn.If(cmp) + resp, err := t.Then(clientv3.OpPut(key, value, clientv3.WithLease(session.Lease()))).Commit() + cancel() + if err != nil { + return err + } + if !resp.Succeeded { + logutil.BgLogger().Info("proposed random serverID exists, will randomize again", zap.Int64("randServerID", randServerID)) + time.Sleep(acquireServerIDRetryInterval) + continue + } + + atomic.StoreUint64(&do.serverID, uint64(randServerID)) + logutil.BgLogger().Info("acquireServerID", zap.Uint64("serverID", do.ServerID()), + zap.String("lease id", strconv.FormatInt(int64(session.Lease()), 16))) + return nil + } +} + +func (do *Domain) refreshServerIDTTL(ctx context.Context) error { + session, err := do.retrieveServerIDSession(ctx) + if err != nil { + return err + } + + key := fmt.Sprintf("%s/%v", serverIDEtcdPath, do.ServerID()) + value := "0" + err = ddlutil.PutKVToEtcd(ctx, do.etcdClient, refreshServerIDRetryCnt, key, value, clientv3.WithLease(session.Lease())) + if err != nil { + logutil.BgLogger().Error("refreshServerIDTTL fail", zap.Uint64("serverID", do.ServerID()), zap.Error(err)) + } else { + logutil.BgLogger().Info("refreshServerIDTTL succeed", zap.Uint64("serverID", do.ServerID()), + zap.String("lease id", strconv.FormatInt(int64(session.Lease()), 16))) + } + return err +} + +func (do *Domain) serverIDKeeper() { + defer func() { + do.wg.Done() + logutil.BgLogger().Info("serverIDKeeper exited.") + }() + defer util.Recover(metrics.LabelDomain, "serverIDKeeper", func() { + logutil.BgLogger().Info("recover serverIDKeeper.") + // should be called before `do.wg.Done()`, to ensure that Domain.Close() waits for the new `serverIDKeeper()` routine. + do.wg.Add(1) + go do.serverIDKeeper() + }, false) + + tickerKeepAlive := time.NewTicker(serverIDTimeToKeepAlive) + tickerCheckRestored := time.NewTicker(serverIDTimeToCheckPDConnectionRestored) + defer func() { + tickerKeepAlive.Stop() + tickerCheckRestored.Stop() + }() + + blocker := make(chan struct{}) // just used for blocking the sessionDone() when session is nil. + sessionDone := func() <-chan struct{} { + if do.serverIDSession == nil { + return blocker + } + return do.serverIDSession.Done() + } + + var lastSucceedTimestamp time.Time + + onConnectionToPDRestored := func() { + logutil.BgLogger().Info("restored connection to PD") + do.isLostConnectionToPD.Set(0) + lastSucceedTimestamp = time.Now() + + if err := do.info.StoreServerInfo(context.Background()); err != nil { + logutil.BgLogger().Error("StoreServerInfo failed", zap.Error(err)) + } + } + + onConnectionToPDLost := func() { + logutil.BgLogger().Warn("lost connection to PD") + do.isLostConnectionToPD.Set(1) + + // Kill all connections when lost connection to PD, + // to avoid the possibility that another TiDB instance acquires the same serverID and generates a same connection ID, + // which will lead to a wrong connection killed. + do.InfoSyncer().GetSessionManager().KillAllConnections() + } + + for { + select { + case <-tickerKeepAlive.C: + if !do.IsLostConnectionToPD() { + if err := do.refreshServerIDTTL(context.Background()); err == nil { + lastSucceedTimestamp = time.Now() + } else { + if lostConnectionToPDTimeout > 0 && time.Since(lastSucceedTimestamp) > lostConnectionToPDTimeout { + onConnectionToPDLost() + } + } + } + case <-tickerCheckRestored.C: + if do.IsLostConnectionToPD() { + if err := do.acquireServerID(context.Background()); err == nil { + onConnectionToPDRestored() + } + } + case <-sessionDone(): + // inform that TTL of `serverID` is expired. See https://godoc.org/github.com/coreos/etcd/clientv3/concurrency#Session.Done + // Should be in `IsLostConnectionToPD` state, as `lostConnectionToPDTimeout` is shorter than `serverIDTTL`. + // So just set `do.serverIDSession = nil` to restart `serverID` session in `retrieveServerIDSession()`. + logutil.BgLogger().Info("serverIDSession need restart") + do.serverIDSession = nil + case <-do.exit: + return + } + } +} + +func init() { + initByLDFlagsForGlobalKill() +} + var ( // ErrInfoSchemaExpired returns the error that information schema is out of date. ErrInfoSchemaExpired = dbterror.ClassDomain.NewStd(errno.ErrInfoSchemaExpired) diff --git a/domain/domain_test.go b/domain/domain_test.go index 099a045d339e5..4c0a23611ad6a 100644 --- a/domain/domain_test.go +++ b/domain/domain_test.go @@ -220,6 +220,16 @@ func TestInfo(t *testing.T) { t.Fatalf("err %v, infos %v", err, infos) } + // Test for acquireServerID & refreshServerIDTTL + err = dom.acquireServerID(goCtx) + if err != nil || dom.ServerID() == 0 { + t.Fatalf("dom.acquireServerID err %v, serverID %v", err, dom.ServerID()) + } + err = dom.refreshServerIDTTL(goCtx) + if err != nil { + t.Fatalf("dom.refreshServerIDTTL err %v", err) + } + err = failpoint.Disable("github.com/pingcap/tidb/domain/FailPlacement") if err != nil { t.Fatal(err) @@ -249,8 +259,14 @@ func (msm *mockSessionManager) GetProcessInfo(id uint64) (*util.ProcessInfo, boo func (msm *mockSessionManager) Kill(cid uint64, query bool) {} +func (msm *mockSessionManager) KillAllConnections() {} + func (msm *mockSessionManager) UpdateTLSConfig(cfg *tls.Config) {} +func (msm *mockSessionManager) ServerID() uint64 { + return 1 +} + func (*testSuite) TestT(c *C) { defer testleak.AfterTest(c)() store, err := mockstore.NewMockStore() @@ -476,3 +492,7 @@ func (*testSuite) TestErrorCode(c *C) { c.Assert(int(terror.ToSQLError(ErrInfoSchemaExpired).Code), Equals, errno.ErrInfoSchemaExpired) c.Assert(int(terror.ToSQLError(ErrInfoSchemaChanged).Code), Equals, errno.ErrInfoSchemaChanged) } + +func (*testSuite) TestServerIDConstant(c *C) { + c.Assert(lostConnectionToPDTimeout, Less, serverIDTTL) +} diff --git a/domain/infosync/info.go b/domain/infosync/info.go index ce15a829d28a3..05d62e89d4b00 100644 --- a/domain/infosync/info.go +++ b/domain/infosync/info.go @@ -111,6 +111,33 @@ type ServerInfo struct { BinlogStatus string `json:"binlog_status"` StartTimestamp int64 `json:"start_timestamp"` Labels map[string]string `json:"labels"` + // ServerID is a function, to always retrieve latest serverID from `Domain`, + // which will be changed on occasions such as connection to PD is restored after broken. + ServerIDGetter func() uint64 `json:"-"` + + // JSONServerID is `serverID` for json marshal/unmarshal ONLY. + JSONServerID uint64 `json:"server_id"` +} + +// Marshal `ServerInfo` into bytes. +func (info *ServerInfo) Marshal() ([]byte, error) { + info.JSONServerID = info.ServerIDGetter() + infoBuf, err := json.Marshal(info) + if err != nil { + return nil, errors.Trace(err) + } + return infoBuf, nil +} + +// Unmarshal `ServerInfo` from bytes. +func (info *ServerInfo) Unmarshal(v []byte) error { + if err := json.Unmarshal(v, info); err != nil { + return err + } + info.ServerIDGetter = func() uint64 { + return info.JSONServerID + } + return nil } // ServerVersionInfo is the server version and git_hash. @@ -137,10 +164,10 @@ func setGlobalInfoSyncer(is *InfoSyncer) { } // GlobalInfoSyncerInit return a new InfoSyncer. It is exported for testing. -func GlobalInfoSyncerInit(ctx context.Context, id string, etcdCli *clientv3.Client, skipRegisterToDashBoard bool) (*InfoSyncer, error) { +func GlobalInfoSyncerInit(ctx context.Context, id string, serverIDGetter func() uint64, etcdCli *clientv3.Client, skipRegisterToDashBoard bool) (*InfoSyncer, error) { is := &InfoSyncer{ etcdCli: etcdCli, - info: getServerInfo(id), + info: getServerInfo(id, serverIDGetter), serverInfoPath: fmt.Sprintf("%s/%s", ServerInformationPath, id), minStartTSPath: fmt.Sprintf("%s/%s", ServerMinStartTSPath, id), } @@ -169,6 +196,11 @@ func (is *InfoSyncer) SetSessionManager(manager util2.SessionManager) { is.manager = manager } +// GetSessionManager get the session manager. +func (is *InfoSyncer) GetSessionManager() util2.SessionManager { + return is.manager +} + // GetServerInfo gets self server static information. func GetServerInfo() (*ServerInfo, error) { is, err := getGlobalInfoSyncer() @@ -457,7 +489,7 @@ func PutRuleBundles(ctx context.Context, bundles []*placement.Bundle) error { func (is *InfoSyncer) getAllServerInfo(ctx context.Context) (map[string]*ServerInfo, error) { allInfo := make(map[string]*ServerInfo) if is.etcdCli == nil { - allInfo[is.info.ID] = getServerInfo(is.info.ID) + allInfo[is.info.ID] = getServerInfo(is.info.ID, is.info.ServerIDGetter) return allInfo, nil } allInfo, err := getInfo(ctx, is.etcdCli, ServerInformationPath, keyOpDefaultRetryCnt, keyOpDefaultTimeout, clientv3.WithPrefix()) @@ -467,12 +499,12 @@ func (is *InfoSyncer) getAllServerInfo(ctx context.Context) (map[string]*ServerI return allInfo, nil } -// storeServerInfo stores self server static information to etcd. -func (is *InfoSyncer) storeServerInfo(ctx context.Context) error { +// StoreServerInfo stores self server static information to etcd. +func (is *InfoSyncer) StoreServerInfo(ctx context.Context) error { if is.etcdCli == nil { return nil } - infoBuf, err := json.Marshal(is.info) + infoBuf, err := is.info.Marshal() if err != nil { return errors.Trace(err) } @@ -636,10 +668,10 @@ func (is *InfoSyncer) newSessionAndStoreServerInfo(ctx context.Context, retryCnt is.session = session binloginfo.RegisterStatusListener(func(status binloginfo.BinlogStatus) error { is.info.BinlogStatus = status.String() - err := is.storeServerInfo(ctx) + err := is.StoreServerInfo(ctx) return errors.Trace(err) }) - return is.storeServerInfo(ctx) + return is.StoreServerInfo(ctx) } // newTopologySessionAndStoreServerInfo creates a new etcd session and stores server info to etcd. @@ -783,7 +815,7 @@ func getInfo(ctx context.Context, etcdCli *clientv3.Client, key string, retryCnt info := &ServerInfo{ BinlogStatus: binloginfo.BinlogStatusUnknown.String(), } - err = json.Unmarshal(kv.Value, info) + err = info.Unmarshal(kv.Value) if err != nil { logutil.BgLogger().Info("get key failed", zap.String("key", string(kv.Key)), zap.ByteString("value", kv.Value), zap.Error(err)) @@ -797,7 +829,7 @@ func getInfo(ctx context.Context, etcdCli *clientv3.Client, key string, retryCnt } // getServerInfo gets self tidb server information. -func getServerInfo(id string) *ServerInfo { +func getServerInfo(id string, serverIDGetter func() uint64) *ServerInfo { cfg := config.GetGlobalConfig() info := &ServerInfo{ ID: id, @@ -808,6 +840,7 @@ func getServerInfo(id string) *ServerInfo { BinlogStatus: binloginfo.GetStatus().String(), StartTimestamp: time.Now().Unix(), Labels: cfg.Labels, + ServerIDGetter: serverIDGetter, } info.Version = mysql.ServerVersion info.GitHash = versioninfo.TiDBGitHash diff --git a/domain/infosync/info_test.go b/domain/infosync/info_test.go index a3a67564b8ac5..315244b513989 100644 --- a/domain/infosync/info_test.go +++ b/domain/infosync/info_test.go @@ -90,7 +90,7 @@ func TestTopology(t *testing.T) { failpoint.Enable("github.com/pingcap/tidb/domain/infosync/mockServerInfo", "return(true)") defer failpoint.Disable("github.com/pingcap/tidb/domain/infosync/mockServerInfo") - info, err := GlobalInfoSyncerInit(ctx, currentID, cli, false) + info, err := GlobalInfoSyncerInit(ctx, currentID, func() uint64 { return 1 }, cli, false) if err != nil { t.Fatal(err) } diff --git a/executor/builder.go b/executor/builder.go index fe6fb28679beb..97fba24aa907d 100644 --- a/executor/builder.go +++ b/executor/builder.go @@ -162,6 +162,8 @@ func (b *executorBuilder) build(p plannercore.Plan) Executor { return b.buildShow(v) case *plannercore.Simple: return b.buildSimple(v) + case *plannercore.PhysicalSimpleWrapper: + return b.buildSimple(&v.Inner) case *plannercore.Set: return b.buildSet(v) case *plannercore.SetConfig: @@ -701,6 +703,7 @@ func (b *executorBuilder) buildSimple(v *plannercore.Simple) Executor { e := &SimpleExec{ baseExecutor: base, Statement: v.Statement, + IsFromRemote: v.IsFromRemote, is: b.is, } return e diff --git a/executor/executor_pkg_test.go b/executor/executor_pkg_test.go index a95f12b69788c..780e2df38c74e 100644 --- a/executor/executor_pkg_test.go +++ b/executor/executor_pkg_test.go @@ -52,7 +52,8 @@ type testExecSerialSuite struct { // mockSessionManager is a mocked session manager which is used for test. type mockSessionManager struct { - PS []*util.ProcessInfo + PS []*util.ProcessInfo + serverID uint64 } // ShowProcessList implements the SessionManager.ShowProcessList interface. @@ -75,12 +76,22 @@ func (msm *mockSessionManager) GetProcessInfo(id uint64) (*util.ProcessInfo, boo // Kill implements the SessionManager.Kill interface. func (msm *mockSessionManager) Kill(cid uint64, query bool) { +} +func (msm *mockSessionManager) KillAllConnections() { } func (msm *mockSessionManager) UpdateTLSConfig(cfg *tls.Config) { } +func (msm *mockSessionManager) ServerID() uint64 { + return msm.serverID +} + +func (msm *mockSessionManager) SetServerID(serverID uint64) { + msm.serverID = serverID +} + func (s *testExecSuite) TestShowProcessList(c *C) { // Compose schema. names := []string{"Id", "User", "Host", "db", "Command", "Time", "State", "Info"} diff --git a/executor/explainfor_test.go b/executor/explainfor_test.go index 8ad7a1de43e46..00de940ed6b8c 100644 --- a/executor/explainfor_test.go +++ b/executor/explainfor_test.go @@ -56,12 +56,18 @@ func (msm *mockSessionManager1) GetProcessInfo(id uint64) (*util.ProcessInfo, bo // Kill implements the SessionManager.Kill interface. func (msm *mockSessionManager1) Kill(cid uint64, query bool) { +} +func (msm *mockSessionManager1) KillAllConnections() { } func (msm *mockSessionManager1) UpdateTLSConfig(cfg *tls.Config) { } +func (msm *mockSessionManager1) ServerID() uint64 { + return 1 +} + func (s *testSerialSuite) TestExplainFor(c *C) { tkRoot := testkit.NewTestKitWithInit(c, s.store) tkUser := testkit.NewTestKitWithInit(c, s.store) diff --git a/executor/infoschema_reader.go b/executor/infoschema_reader.go index 736d2a9300be3..1ee6c713b2ed1 100644 --- a/executor/infoschema_reader.go +++ b/executor/infoschema_reader.go @@ -1090,6 +1090,7 @@ func (e *memtableRetriever) dataForTiDBClusterInfo(ctx sessionctx.Context) error server.GitHash, startTimeStr, upTimeStr, + server.ServerID, ) rows = append(rows, row) } diff --git a/executor/infoschema_reader_test.go b/executor/infoschema_reader_test.go index 453d2d5189a7b..53ae0cc919c61 100644 --- a/executor/infoschema_reader_test.go +++ b/executor/infoschema_reader_test.go @@ -112,38 +112,38 @@ func (s *inspectionSuite) TearDownSuite(c *C) { func (s *inspectionSuite) TestInspectionTables(c *C) { tk := testkit.NewTestKit(c, s.store) instances := []string{ - "pd,127.0.0.1:11080,127.0.0.1:10080,mock-version,mock-githash", - "tidb,127.0.0.1:11080,127.0.0.1:10080,mock-version,mock-githash", - "tikv,127.0.0.1:11080,127.0.0.1:10080,mock-version,mock-githash", + "pd,127.0.0.1:11080,127.0.0.1:10080,mock-version,mock-githash,0", + "tidb,127.0.0.1:11080,127.0.0.1:10080,mock-version,mock-githash,1001", + "tikv,127.0.0.1:11080,127.0.0.1:10080,mock-version,mock-githash,0", } fpName := "github.com/pingcap/tidb/infoschema/mockClusterInfo" fpExpr := `return("` + strings.Join(instances, ";") + `")` c.Assert(failpoint.Enable(fpName, fpExpr), IsNil) defer func() { c.Assert(failpoint.Disable(fpName), IsNil) }() - tk.MustQuery("select type, instance, status_address, version, git_hash from information_schema.cluster_info").Check(testkit.Rows( - "pd 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash", - "tidb 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash", - "tikv 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash", + tk.MustQuery("select type, instance, status_address, version, git_hash, server_id from information_schema.cluster_info").Check(testkit.Rows( + "pd 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash 0", + "tidb 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash 1001", + "tikv 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash 0", )) // enable inspection mode inspectionTableCache := map[string]variable.TableSnapshot{} tk.Se.GetSessionVars().InspectionTableCache = inspectionTableCache - tk.MustQuery("select type, instance, status_address, version, git_hash from information_schema.cluster_info").Check(testkit.Rows( - "pd 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash", - "tidb 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash", - "tikv 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash", + tk.MustQuery("select type, instance, status_address, version, git_hash, server_id from information_schema.cluster_info").Check(testkit.Rows( + "pd 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash 0", + "tidb 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash 1001", + "tikv 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash 0", )) c.Assert(inspectionTableCache["cluster_info"].Err, IsNil) c.Assert(len(inspectionTableCache["cluster_info"].Rows), DeepEquals, 3) // check whether is obtain data from cache at the next time inspectionTableCache["cluster_info"].Rows[0][0].SetString("modified-pd", mysql.DefaultCollationName) - tk.MustQuery("select type, instance, status_address, version, git_hash from information_schema.cluster_info").Check(testkit.Rows( - "modified-pd 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash", - "tidb 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash", - "tikv 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash", + tk.MustQuery("select type, instance, status_address, version, git_hash, server_id from information_schema.cluster_info").Check(testkit.Rows( + "modified-pd 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash 0", + "tidb 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash 1001", + "tikv 127.0.0.1:11080 127.0.0.1:10080 mock-version mock-githash 0", )) tk.Se.GetSessionVars().InspectionTableCache = nil } @@ -588,7 +588,10 @@ func (s *testInfoschemaClusterTableSuite) setUpRPCService(c *C, addr string) (*g lis, err := net.Listen("tcp", addr) c.Assert(err, IsNil) // Fix issue 9836 - sm := &mockSessionManager{make(map[uint64]*util.ProcessInfo, 1)} + sm := &mockSessionManager{ + processInfoMap: make(map[uint64]*util.ProcessInfo, 1), + serverID: 1, + } sm.processInfoMap[1] = &util.ProcessInfo{ ID: 1, User: "root", @@ -693,6 +696,7 @@ func (s *testInfoschemaClusterTableSuite) TearDownSuite(c *C) { type mockSessionManager struct { processInfoMap map[uint64]*util.ProcessInfo + serverID uint64 } func (sm *mockSessionManager) ShowProcessList() map[uint64]*util.ProcessInfo { @@ -706,8 +710,18 @@ func (sm *mockSessionManager) GetProcessInfo(id uint64) (*util.ProcessInfo, bool func (sm *mockSessionManager) Kill(connectionID uint64, query bool) {} +func (sm *mockSessionManager) KillAllConnections() {} + func (sm *mockSessionManager) UpdateTLSConfig(cfg *tls.Config) {} +func (sm *mockSessionManager) ServerID() uint64 { + return sm.serverID +} + +func (sm *mockSessionManager) SetServerID(serverID uint64) { + sm.serverID = serverID +} + type mockStore struct { tikv.Storage host string @@ -745,13 +759,18 @@ func (s *testInfoschemaClusterTableSuite) TestTiDBClusterInfo(c *C) { // information_schema.cluster_config instances := []string{ - "pd,127.0.0.1:11080," + mockAddr + ",mock-version,mock-githash", - "tidb,127.0.0.1:11080," + mockAddr + ",mock-version,mock-githash", - "tikv,127.0.0.1:11080," + mockAddr + ",mock-version,mock-githash", + "pd,127.0.0.1:11080," + mockAddr + ",mock-version,mock-githash,0", + "tidb,127.0.0.1:11080," + mockAddr + ",mock-version,mock-githash,1001", + "tikv,127.0.0.1:11080," + mockAddr + ",mock-version,mock-githash,0", } fpExpr := `return("` + strings.Join(instances, ";") + `")` c.Assert(failpoint.Enable("github.com/pingcap/tidb/infoschema/mockClusterInfo", fpExpr), IsNil) defer func() { c.Assert(failpoint.Disable("github.com/pingcap/tidb/infoschema/mockClusterInfo"), IsNil) }() + tk.MustQuery("select type, instance, status_address, version, git_hash, server_id from information_schema.cluster_info").Check(testkit.Rows( + row("pd", "127.0.0.1:11080", mockAddr, "mock-version", "mock-githash", "0"), + row("tidb", "127.0.0.1:11080", mockAddr, "mock-version", "mock-githash", "1001"), + row("tikv", "127.0.0.1:11080", mockAddr, "mock-version", "mock-githash", "0"), + )) tk.MustQuery("select * from information_schema.cluster_config").Check(testkit.Rows( "pd 127.0.0.1:11080 key1 value1", "pd 127.0.0.1:11080 key2.nest1 n-value1", diff --git a/executor/prepared_test.go b/executor/prepared_test.go index 8b8c7e7cba60c..f3b461d287629 100644 --- a/executor/prepared_test.go +++ b/executor/prepared_test.go @@ -132,7 +132,11 @@ func (sm *mockSessionManager2) Kill(connectionID uint64, query bool) { sm.killed = true atomic.StoreUint32(&sm.se.GetSessionVars().Killed, 1) } +func (sm *mockSessionManager2) KillAllConnections() {} func (sm *mockSessionManager2) UpdateTLSConfig(cfg *tls.Config) {} +func (sm *mockSessionManager2) ServerID() uint64 { + return 1 +} var _ = SerialSuites(&testSuite12{&baseTestSuite{}}) diff --git a/executor/seqtest/prepared_test.go b/executor/seqtest/prepared_test.go index 65d23c8c27304..7cdeed02a9afe 100644 --- a/executor/seqtest/prepared_test.go +++ b/executor/seqtest/prepared_test.go @@ -751,6 +751,12 @@ func (msm *mockSessionManager1) GetProcessInfo(id uint64) (*util.ProcessInfo, bo // Kill implements the SessionManager.Kill interface. func (msm *mockSessionManager1) Kill(cid uint64, query bool) {} +func (msm *mockSessionManager1) KillAllConnections() {} + +func (msm *mockSessionManager1) ServerID() uint64 { + return 1 +} + func (msm *mockSessionManager1) UpdateTLSConfig(cfg *tls.Config) {} func (s *seqTestSuite) TestPreparedIssue17419(c *C) { diff --git a/executor/simple.go b/executor/simple.go index 102519fe27439..6113d0f4c262b 100644 --- a/executor/simple.go +++ b/executor/simple.go @@ -27,6 +27,7 @@ import ( "github.com/pingcap/parser/model" "github.com/pingcap/parser/mysql" "github.com/pingcap/tidb/config" + "github.com/pingcap/tidb/distsql" "github.com/pingcap/tidb/domain" "github.com/pingcap/tidb/infoschema" "github.com/pingcap/tidb/kv" @@ -43,6 +44,8 @@ import ( "github.com/pingcap/tidb/util/hack" "github.com/pingcap/tidb/util/logutil" "github.com/pingcap/tidb/util/sqlexec" + "github.com/pingcap/tidb/util/timeutil" + "github.com/pingcap/tipb/go-tipb" "go.uber.org/zap" ) @@ -60,8 +63,12 @@ type SimpleExec struct { baseExecutor Statement ast.StmtNode - done bool - is infoschema.InfoSchema + // IsFromRemote indicates whether the statement IS FROM REMOTE TiDB instance in cluster, + // and executing in coprocessor. + // Used for `global kill`. See https://github.com/pingcap/tidb/blob/master/docs/design/2020-06-01-global-kill.md. + IsFromRemote bool + done bool + is infoschema.InfoSchema } func (e *baseExecutor) getSysSession() (sessionctx.Context, error) { @@ -127,7 +134,7 @@ func (e *SimpleExec) Next(ctx context.Context, req *chunk.Chunk) (err error) { case *ast.SetPwdStmt: err = e.executeSetPwd(x) case *ast.KillStmt: - err = e.executeKillStmt(x) + err = e.executeKillStmt(ctx, x) case *ast.BinlogStmt: // We just ignore it. return nil @@ -1073,21 +1080,89 @@ func (e *SimpleExec) executeSetPwd(s *ast.SetPwdStmt) error { return err } -func (e *SimpleExec) executeKillStmt(s *ast.KillStmt) error { - conf := config.GetGlobalConfig() - if s.TiDBExtension || conf.CompatibleKillQuery { - sm := e.ctx.GetSessionManager() - if sm == nil { - return nil - } +func (e *SimpleExec) executeKillStmt(ctx context.Context, s *ast.KillStmt) error { + sm := e.ctx.GetSessionManager() + if sm == nil { + return nil + } + + if e.IsFromRemote { + logutil.BgLogger().Info("Killing connection in current instance redirected from remote TiDB", zap.Uint64("connID", s.ConnectionID), zap.Bool("query", s.Query), + zap.String("sourceAddr", e.ctx.GetSessionVars().SourceAddr.IP.String())) sm.Kill(s.ConnectionID, s.Query) - } else { - err := errors.New("Invalid operation. Please use 'KILL TIDB [CONNECTION | QUERY] connectionID' instead") + return nil + } + + connID, isTruncated, err := util.ParseGlobalConnID(s.ConnectionID) + if err != nil { + err1 := errors.New("Parse ConnectionID failed: " + err.Error()) + e.ctx.GetSessionVars().StmtCtx.AppendWarning(err1) + return nil + } + if isTruncated { + message := "Kill failed: Received a 32bits truncated ConnectionID, expect 64bits. Please execute 'KILL [CONNECTION | QUERY] ConnectionID' to send a Kill without truncating ConnectionID." + logutil.BgLogger().Warn(message, zap.Uint64("connID", s.ConnectionID)) + // Notice that this warning cannot be seen if KILL is triggered by "CTRL-C" of mysql client, + // as the KILL is sent by a new connection. + err := errors.New(message) e.ctx.GetSessionVars().StmtCtx.AppendWarning(err) + return nil + } + + if connID.ServerID != sm.ServerID() { + if err := killRemoteConn(ctx, e.ctx, &connID, s.Query); err != nil { + err1 := errors.New("KILL remote connection failed: " + err.Error()) + e.ctx.GetSessionVars().StmtCtx.AppendWarning(err1) + } + } else { + sm.Kill(s.ConnectionID, s.Query) } + return nil } +func killRemoteConn(ctx context.Context, sctx sessionctx.Context, connID *util.GlobalConnID, query bool) error { + if connID.ServerID == 0 { + return errors.New("Unexpected ZERO ServerID. Please file a bug to the TiDB Team") + } + + killExec := &tipb.Executor{ + Tp: tipb.ExecType_TypeKill, + Kill: &tipb.Kill{ConnID: connID.ID(), Query: query}, + } + + dagReq := &tipb.DAGRequest{} + dagReq.TimeZoneName, dagReq.TimeZoneOffset = timeutil.Zone(sctx.GetSessionVars().Location()) + sc := sctx.GetSessionVars().StmtCtx + if sc.RuntimeStatsColl != nil { + collExec := true + dagReq.CollectExecutionSummaries = &collExec + } + dagReq.Flags = sc.PushDownFlags() + dagReq.Executors = []*tipb.Executor{killExec} + + var builder distsql.RequestBuilder + kvReq, err := builder. + SetDAGRequest(dagReq). + SetFromSessionVars(sctx.GetSessionVars()). + SetStoreType(kv.TiDB). + SetTiDBServerID(connID.ServerID). + Build() + if err != nil { + return err + } + + resp := sctx.GetClient().Send(ctx, kvReq, sctx.GetSessionVars().KVVars, sctx.GetSessionVars().StmtCtx.MemTracker) + if resp == nil { + err := errors.New("client returns nil response") + return err + } + + logutil.BgLogger().Info("Killed remote connection", zap.Uint64("serverID", connID.ServerID), + zap.Uint64("connID", connID.ID()), zap.Bool("query", query)) + return err +} + func (e *SimpleExec) executeFlush(s *ast.FlushStmt) error { switch s.Tp { case ast.FlushTables: diff --git a/executor/simple_test.go b/executor/simple_test.go index fca62dedef2d7..6f14a3e32b2c3 100644 --- a/executor/simple_test.go +++ b/executor/simple_test.go @@ -15,6 +15,7 @@ package executor_test import ( "context" + "strconv" . "github.com/pingcap/check" "github.com/pingcap/errors" @@ -29,6 +30,7 @@ import ( "github.com/pingcap/tidb/session" "github.com/pingcap/tidb/sessionctx" "github.com/pingcap/tidb/store/mockstore" + "github.com/pingcap/tidb/util" "github.com/pingcap/tidb/util/testkit" "github.com/pingcap/tidb/util/testutil" ) @@ -502,10 +504,34 @@ func (s *testSuite3) TestSetPwd(c *C) { func (s *testSuite3) TestKillStmt(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") - tk.MustExec("kill 1") + sm := &mockSessionManager{ + serverID: 0, + } + tk.Se.SetSessionManager(sm) + // ZERO serverID, treated as truncated. + tk.MustExec("kill 1") result := tk.MustQuery("show warnings") - result.Check(testkit.Rows("Warning 1105 Invalid operation. Please use 'KILL TIDB [CONNECTION | QUERY] connectionID' instead")) + result.Check(testkit.Rows("Warning 1105 Kill failed: Received a 32bits truncated ConnectionID, expect 64bits. Please execute 'KILL [CONNECTION | QUERY] ConnectionID' to send a Kill without truncating ConnectionID.")) + + // truncated + sm.SetServerID(1) + tk.MustExec("kill 101") + result = tk.MustQuery("show warnings") + result.Check(testkit.Rows("Warning 1105 Kill failed: Received a 32bits truncated ConnectionID, expect 64bits. Please execute 'KILL [CONNECTION | QUERY] ConnectionID' to send a Kill without truncating ConnectionID.")) + + // excceed int64 + tk.MustExec("kill 9223372036854775808") // 9223372036854775808 == 2^63 + result = tk.MustQuery("show warnings") + result.Check(testkit.Rows("Warning 1105 Parse ConnectionID failed: Unexpected connectionID excceeds int64")) + + // local kill + connID := util.GlobalConnID{Is64bits: true, ServerID: 1, LocalConnID: 101} + tk.MustExec("kill " + strconv.FormatUint(connID.ID(), 10)) + result = tk.MustQuery("show warnings") + result.Check(testkit.Rows()) + + // remote kill is tested in `tests/globalkilltest` } func (s *testSuite3) TestFlushPrivileges(c *C) { diff --git a/infoschema/tables.go b/infoschema/tables.go index 64fe4496ef418..b9814e8d05361 100644 --- a/infoschema/tables.go +++ b/infoschema/tables.go @@ -970,6 +970,7 @@ var tableClusterInfoCols = []columnInfo{ {name: "GIT_HASH", tp: mysql.TypeVarchar, size: 64}, {name: "START_TIME", tp: mysql.TypeVarchar, size: 32}, {name: "UPTIME", tp: mysql.TypeVarchar, size: 32}, + {name: "SERVER_ID", tp: mysql.TypeLonglong, size: 21}, } var tableTableTiFlashReplicaCols = []columnInfo{ @@ -1306,6 +1307,7 @@ type ServerInfo struct { Version string GitHash string StartTimestamp int64 + ServerID uint64 } func (s *ServerInfo) isLoopBackOrUnspecifiedAddr(addr string) bool { @@ -1345,12 +1347,17 @@ func GetClusterServerInfo(ctx sessionctx.Context) ([]ServerInfo, error) { var servers []ServerInfo for _, server := range strings.Split(s, ";") { parts := strings.Split(server, ",") + serverID, err := strconv.ParseUint(parts[5], 10, 64) + if err != nil { + panic("convert parts[5] to uint64 failed") + } servers = append(servers, ServerInfo{ ServerType: parts[0], Address: parts[1], StatusAddr: parts[2], Version: parts[3], GitHash: parts[4], + ServerID: serverID, }) } failpoint.Return(servers, nil) @@ -1392,6 +1399,7 @@ func GetTiDBServerInfo(ctx sessionctx.Context) ([]ServerInfo, error) { Version: FormatVersion(node.Version, isDefaultVersion), GitHash: node.GitHash, StartTimestamp: node.StartTimestamp, + ServerID: node.ServerIDGetter(), }) } return servers, nil diff --git a/infoschema/tables_test.go b/infoschema/tables_test.go index e4f6fbb596a71..53e7dcd71855f 100644 --- a/infoschema/tables_test.go +++ b/infoschema/tables_test.go @@ -444,8 +444,14 @@ func (sm *mockSessionManager) GetProcessInfo(id uint64) (*util.ProcessInfo, bool func (sm *mockSessionManager) Kill(connectionID uint64, query bool) {} +func (sm *mockSessionManager) KillAllConnections() {} + func (sm *mockSessionManager) UpdateTLSConfig(cfg *tls.Config) {} +func (sm *mockSessionManager) ServerID() uint64 { + return 1 +} + func (s *testTableSuite) TestSomeTables(c *C) { se, err := session.CreateSession4Test(s.store) c.Assert(err, IsNil) @@ -691,9 +697,9 @@ func (s *testTableSuite) TestReloadDropDatabase(c *C) { func (s *testClusterTableSuite) TestForClusterServerInfo(c *C) { tk := testkit.NewTestKit(c, s.store) instances := []string{ - strings.Join([]string{"tidb", s.listenAddr, s.listenAddr, "mock-version,mock-githash"}, ","), - strings.Join([]string{"pd", s.listenAddr, s.listenAddr, "mock-version,mock-githash"}, ","), - strings.Join([]string{"tikv", s.listenAddr, s.listenAddr, "mock-version,mock-githash"}, ","), + strings.Join([]string{"tidb", s.listenAddr, s.listenAddr, "mock-version,mock-githash,1001"}, ","), + strings.Join([]string{"pd", s.listenAddr, s.listenAddr, "mock-version,mock-githash,0"}, ","), + strings.Join([]string{"tikv", s.listenAddr, s.listenAddr, "mock-version,mock-githash,0"}, ","), } fpExpr := `return("` + strings.Join(instances, ";") + `")` diff --git a/kv/kv.go b/kv/kv.go index dca0efe69ea37..5b4ce45fc3c79 100644 --- a/kv/kv.go +++ b/kv/kv.go @@ -404,6 +404,8 @@ type Request struct { BatchCop bool // TaskID is an unique ID for an execution of a statement TaskID uint64 + // TiDBServerID is the specified TiDB serverID to execute request. `0` means all TiDB instances. + TiDBServerID uint64 } // MPPTask stands for a min execution unit for mpp. diff --git a/planner/core/common_plans.go b/planner/core/common_plans.go index a4dcc7296bcdc..a013cec339cda 100644 --- a/planner/core/common_plans.go +++ b/planner/core/common_plans.go @@ -649,6 +649,18 @@ type Simple struct { baseSchemaProducer Statement ast.StmtNode + + // IsFromRemote indicates whether the statement IS FROM REMOTE TiDB instance in cluster, + // and executing in co-processor. + // Used for `global kill`. See https://github.com/pingcap/tidb/blob/master/docs/design/2020-06-01-global-kill.md. + IsFromRemote bool +} + +// PhysicalSimpleWrapper is a wrapper of `Simple` to implement physical plan interface. +// Used for simple statements executing in coprocessor. +type PhysicalSimpleWrapper struct { + basePhysicalPlan + Inner Simple } // InsertGeneratedColumns is for completing generated columns in Insert. diff --git a/planner/core/pb_to_plan.go b/planner/core/pb_to_plan.go index 5ab1e76062b6f..6556edd0fb85e 100644 --- a/planner/core/pb_to_plan.go +++ b/planner/core/pb_to_plan.go @@ -17,6 +17,7 @@ import ( "strings" "github.com/pingcap/errors" + "github.com/pingcap/parser/ast" "github.com/pingcap/parser/model" "github.com/pingcap/tidb/expression" "github.com/pingcap/tidb/expression/aggregation" @@ -68,6 +69,8 @@ func (b *PBPlanBuilder) pbToPhysicalPlan(e *tipb.Executor) (p PhysicalPlan, err p, err = b.pbToAgg(e, false) case tipb.ExecType_TypeStreamAgg: p, err = b.pbToAgg(e, true) + case tipb.ExecType_TypeKill: + p, err = b.pbToKill(e) default: // TODO: Support other types. err = errors.Errorf("this exec type %v doesn't support yet.", e.GetTp()) @@ -230,6 +233,15 @@ func (b *PBPlanBuilder) convertColumnInfo(tblInfo *model.TableInfo, pbColumns [] return columns, nil } +func (b *PBPlanBuilder) pbToKill(e *tipb.Executor) (PhysicalPlan, error) { + node := &ast.KillStmt{ + ConnectionID: e.Kill.ConnID, + Query: e.Kill.Query, + } + simple := Simple{Statement: node, IsFromRemote: true} + return &PhysicalSimpleWrapper{Inner: simple}, nil +} + func (b *PBPlanBuilder) predicatePushDown(p PhysicalPlan, predicates []expression.Expression) ([]expression.Expression, PhysicalPlan) { if p == nil { return predicates, p diff --git a/server/conn.go b/server/conn.go index ed01a165e21f4..a71817e797267 100644 --- a/server/conn.go +++ b/server/conn.go @@ -145,7 +145,7 @@ var ( func newClientConn(s *Server) *clientConn { return &clientConn{ server: s, - connectionID: atomic.AddUint32(&baseConnID, 1), + connectionID: s.globalConnID.NextID(), collation: mysql.DefaultCollationID, alloc: arena.NewAllocator(32 * 1024), status: connStatusDispatching, @@ -160,7 +160,7 @@ type clientConn struct { tlsConn *tls.Conn // TLS connection, nil if not TLS. server *Server // a reference of server instance. capability uint32 // client capability affects the way server handles client request. - connectionID uint32 // atomically allocated by a global variable, unique in process scope. + connectionID uint64 // atomically allocated by a global variable, unique in process scope. user string // user of the client. dbname string // default database name. salt []byte // random bytes used for authentication. @@ -663,7 +663,7 @@ func (cc *clientConn) openSessionAndDoAuth(authData []byte) error { tlsStatePtr = &tlsState } var err error - cc.ctx, err = cc.server.driver.OpenCtx(uint64(cc.connectionID), cc.capability, cc.collation, cc.dbname, tlsStatePtr) + cc.ctx, err = cc.server.driver.OpenCtx(cc.connectionID, cc.capability, cc.collation, cc.dbname, tlsStatePtr) if err != nil { return err } @@ -1892,7 +1892,7 @@ func (cc *clientConn) handleResetConnection(ctx context.Context) error { tlsState := cc.tlsConn.ConnectionState() tlsStatePtr = &tlsState } - cc.ctx, err = cc.server.driver.OpenCtx(uint64(cc.connectionID), cc.capability, cc.collation, cc.dbname, tlsStatePtr) + cc.ctx, err = cc.server.driver.OpenCtx(cc.connectionID, cc.capability, cc.collation, cc.dbname, tlsStatePtr) if err != nil { return err } diff --git a/server/conn_test.go b/server/conn_test.go index 8f94bda3c746d..35c92986be0e1 100644 --- a/server/conn_test.go +++ b/server/conn_test.go @@ -564,14 +564,14 @@ func (ts *ConnTestSuite) TestConnExecutionTimeout(c *C) { se, err := session.CreateSession4Test(ts.store) c.Assert(err, IsNil) - connID := 1 - se.SetConnectionID(uint64(connID)) + connID := uint64(1) + se.SetConnectionID(connID) tc := &TiDBContext{ Session: se, stmts: make(map[int]*TiDBStatement), } cc := &clientConn{ - connectionID: uint32(connID), + connectionID: connID, server: &Server{ capability: defaultCapability, }, @@ -579,8 +579,8 @@ func (ts *ConnTestSuite) TestConnExecutionTimeout(c *C) { alloc: arena.NewAllocator(32 * 1024), } srv := &Server{ - clients: map[uint32]*clientConn{ - uint32(connID): cc, + clients: map[uint64]*clientConn{ + connID: cc, }, } handle := ts.dom.ExpensiveQueryHandle().SetSessionManager(srv) diff --git a/server/rpc_server.go b/server/rpc_server.go index fcc9c9df8cd7b..b94fb5c0c0637 100644 --- a/server/rpc_server.go +++ b/server/rpc_server.go @@ -16,6 +16,7 @@ package server import ( "context" "fmt" + "net" "github.com/pingcap/kvproto/pkg/coprocessor" "github.com/pingcap/kvproto/pkg/diagnosticspb" @@ -35,6 +36,7 @@ import ( "github.com/pingcap/tidb/util/memory" "go.uber.org/zap" "google.golang.org/grpc" + "google.golang.org/grpc/peer" ) // NewRPCServer creates a new rpc server. @@ -185,6 +187,10 @@ func (s *rpcServer) handleCopRequest(ctx context.Context, req *coprocessor.Reque } defer se.Close() + if p, ok := peer.FromContext(ctx); ok { + se.GetSessionVars().SourceAddr = *p.Addr.(*net.TCPAddr) + } + h := executor.NewCoprocessorDAGHandler(se) return h.HandleRequest(ctx, req) } diff --git a/server/server.go b/server/server.go index a448ef91102df..72fcda744b5db 100644 --- a/server/server.go +++ b/server/server.go @@ -118,9 +118,10 @@ type Server struct { socket net.Listener rwlock sync.RWMutex concurrentLimiter *TokenLimiter - clients map[uint32]*clientConn + clients map[uint64]*clientConn capability uint32 dom *domain.Domain + globalConnID util.GlobalConnID statusAddr string statusListener net.Listener @@ -153,6 +154,14 @@ func (s *Server) SetDomain(dom *domain.Domain) { s.dom = dom } +// InitGlobalConnID initialize global connection id. +func (s *Server) InitGlobalConnID(serverIDGetter func() uint64) { + s.globalConnID = util.GlobalConnID{ + ServerIDGetter: serverIDGetter, + Is64bits: true, + } +} + // newConn creates a new *clientConn from a net.Conn. // It allocates a connection ID and random salt data for authentication. func (s *Server) newConn(conn net.Conn) *clientConn { @@ -212,7 +221,8 @@ func NewServer(cfg *config.Config, driver IDriver) (*Server, error) { cfg: cfg, driver: driver, concurrentLimiter: NewTokenLimiter(cfg.TokenLimit), - clients: make(map[uint32]*clientConn), + clients: make(map[uint64]*clientConn), + globalConnID: util.GlobalConnID{ServerID: 0, Is64bits: true}, } tlsConfig, err := util.LoadTLSCertificates(s.cfg.Security.SSLCA, s.cfg.Security.SSLKey, s.cfg.Security.SSLCert) @@ -338,6 +348,12 @@ func (s *Server) Run() error { continue } + if s.dom != nil && s.dom.IsLostConnectionToPD() { + logutil.BgLogger().Warn("reject connection due to lost connection to PD") + terror.Log(clientConn.Close()) + continue + } + go s.onConn(clientConn) } } @@ -501,7 +517,7 @@ func (s *Server) ShowProcessList() map[uint64]*util.ProcessInfo { // GetProcessInfo implements the SessionManager interface. func (s *Server) GetProcessInfo(id uint64) (*util.ProcessInfo, bool) { s.rwlock.RLock() - conn, ok := s.clients[uint32(id)] + conn, ok := s.clients[id] s.rwlock.RUnlock() if !ok || atomic.LoadInt32(&conn.status) == connStatusWaitShutdown { return &util.ProcessInfo{}, false @@ -516,7 +532,7 @@ func (s *Server) Kill(connectionID uint64, query bool) { s.rwlock.RLock() defer s.rwlock.RUnlock() - conn, ok := s.clients[uint32(connectionID)] + conn, ok := s.clients[connectionID] if !ok { return } @@ -628,6 +644,11 @@ func (s *Server) kickIdleConnection() { } } +// ServerID implements SessionManager interface. +func (s *Server) ServerID() uint64 { + return s.dom.ServerID() +} + // setSysTimeZoneOnce is used for parallel run tests. When several servers are running, // only the first will actually do setSystemTimeZoneVariable, thus we can avoid data race. var setSysTimeZoneOnce = &sync.Once{} diff --git a/sessionctx/variable/session.go b/sessionctx/variable/session.go index 2d47433dc7cc7..cd2d4e64c4095 100644 --- a/sessionctx/variable/session.go +++ b/sessionctx/variable/session.go @@ -20,6 +20,7 @@ import ( "fmt" "math" "math/rand" + "net" "sort" "strconv" "strings" @@ -768,7 +769,7 @@ func (pps PreparedParams) String() string { // ConnectionInfo present connection used by audit. type ConnectionInfo struct { - ConnectionID uint32 + ConnectionID uint64 ConnectionType string Host string ClientIP string @@ -1640,6 +1641,9 @@ type Concurrency struct { // ExecutorConcurrency is the number of concurrent worker for all executors. ExecutorConcurrency int + + // SourceAddr is the source address of request. Available in coprocessor ONLY. + SourceAddr net.TCPAddr } // SetIndexLookupConcurrency set the number of concurrent index lookup worker. diff --git a/store/tikv/coprocessor.go b/store/tikv/coprocessor.go index 9cd15772f9911..e86fddb9fde24 100644 --- a/store/tikv/coprocessor.go +++ b/store/tikv/coprocessor.go @@ -301,6 +301,10 @@ func buildTiDBMemCopTasks(ranges *copRanges, req *kv.Request) ([]*copTask, error } tasks := make([]*copTask, 0, len(servers)) for _, ser := range servers { + if req.TiDBServerID > 0 && req.TiDBServerID != ser.ServerIDGetter() { + continue + } + addr := ser.IP + ":" + strconv.FormatUint(uint64(ser.StatusPort), 10) tasks = append(tasks, &copTask{ ranges: ranges, diff --git a/store/tikv/kv.go b/store/tikv/kv.go index c03850b2ab5f2..4072ab92c9183 100644 --- a/store/tikv/kv.go +++ b/store/tikv/kv.go @@ -19,6 +19,7 @@ import ( "fmt" "math/rand" "net/url" + "strings" "sync" "sync/atomic" "time" @@ -235,10 +236,22 @@ func (s *tikvStore) IsLatchEnabled() bool { return s.txnLatches != nil } +var ( + ldflagGetEtcdAddrsFromConfig = "0" // 1:Yes, otherwise:No +) + func (s *tikvStore) EtcdAddrs() ([]string, error) { if s.etcdAddrs == nil { return nil, nil } + + if ldflagGetEtcdAddrsFromConfig == "1" { + // For automated test purpose. + // To manipulate connection to etcd by mandatorily setting path to a proxy. + cfg := config.GetGlobalConfig() + return strings.Split(cfg.Path, ","), nil + } + ctx := context.Background() bo := NewBackoffer(ctx, GetMemberInfoBackoff) etcdAddrs := make([]string, 0) diff --git a/tests/globalkilltest/Makefile b/tests/globalkilltest/Makefile new file mode 100644 index 0000000000000..3e9070d28d77e --- /dev/null +++ b/tests/globalkilltest/Makefile @@ -0,0 +1,40 @@ +# Copyright 2020 PingCAP, Inc. +# +# 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, +# See the License for the specific language governing permissions and +# limitations under the License. + +BASE_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/../..) +OUT_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/bin) + +include $(BASE_DIR)/Makefile.common + +GLOBAL_KILL_TEST_SERVER_LDFLAGS = -X "github.com/pingcap/tidb/domain.ldflagIsGlobalKillTest=1" +GLOBAL_KILL_TEST_SERVER_LDFLAGS += -X "github.com/pingcap/tidb/domain.ldflagServerIDTTL=10" +GLOBAL_KILL_TEST_SERVER_LDFLAGS += -X "github.com/pingcap/tidb/domain.ldflagServerIDTimeToKeepAlive=1" +GLOBAL_KILL_TEST_SERVER_LDFLAGS += -X "github.com/pingcap/tidb/domain.ldflagServerIDTimeToCheckPDConnectionRestored=1" +GLOBAL_KILL_TEST_SERVER_LDFLAGS += -X "github.com/pingcap/tidb/domain.ldflagLostConnectionToPDTimeout=5" +GLOBAL_KILL_TEST_SERVER_LDFLAGS += -X "github.com/pingcap/tidb/store/tikv.ldflagGetEtcdAddrsFromConfig=1" + +.PHONY: server buildsucc + +default: server buildsucc + +buildsucc: + @echo "Build TiDB Server (Global Kill Test) successfully! Setup a cluster with PD & TiKV, then Run ./run-tests.sh --pd=." + +server: +ifeq ($(TARGET), "") + cd ${BASE_DIR} && \ + CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(GLOBAL_KILL_TEST_SERVER_LDFLAGS) $(CHECK_FLAG)' -o $(OUT_DIR)/globalkilltest_tidb-server tidb-server/main.go +else + cd ${BASE_DIR} && \ + CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(GLOBAL_KILL_TEST_SERVER_LDFLAGS) $(CHECK_FLAG)' -o '$(TARGET)' tidb-server/main.go +endif diff --git a/tests/globalkilltest/README.md b/tests/globalkilltest/README.md new file mode 100644 index 0000000000000..9107b4f6deeeb --- /dev/null +++ b/tests/globalkilltest/README.md @@ -0,0 +1,101 @@ +# GlobalKillTest + +GlobalKillTest is a test command tool for TiDB __"Global Kill"__ feature. + +_(About __"Global Kill"__, see [design doc](https://github.com/pingcap/tidb/blob/master/docs/design/2020-06-01-global-kill.md) for detail.)_ + +``` +Usage: ./run-tests.sh [options] + + -h: Print this help message. + + -L : Log level of testing. Defaults to "info". + + --server_log_level : Log level of TiDB server. Defaults to "info". + + --tmp : Temporary files path. Defaults to "/tmp/tidb_globalkilltest". + + -s : Use tidb-server in for testing. + Defaults to "bin/globalkilltest_tidb-server". + + --tidb_start_port : First TiDB server listening port. port ~ port+2 will be used. + Defaults to "5000". + + --tidb_status_port : First TiDB server status listening port. port ~ port+2 will be used. + Defaults to "8000". + + --pd : PD client path, ip:port list seperated by comma. + Defaults to "127.0.0.1:2379". + + --pd_proxy_port : PD proxy port. PD proxy is used to simulate lost connection between TiDB and PD. + Defaults to "3379". + + --conn_lost : Lost connection to PD timeout, + should be the same as TiDB ldflag . + See tidb/Makefile for detail. + Defaults to "5". + + --conn_restored : Time to check PD connection restored, + should be the same as TiDB ldflag + . + See tidb/Makefile for detail. + Defaults to "1". + +``` + + +## Prerequisite +1. Build TiDB binary for test. See [Makefile](https://github.com/pingcap/tidb/blob/master/tests/globalkilltest/Makefile) for detail. + +2. Establish a cluster with PD & TiKV, and provide PD client path by `--pd=ip:port[,ip:port]`. + + +## Test Scenarios + +1. A TiDB without PD, killed by Ctrl+C, and killed by KILL. + +2. One TiDB with PD, killed by Ctrl+C, and killed by KILL. + +3. Multiple TiDB nodes, killed {local,remote} by {Ctrl-C,KILL}. + +4. TiDB with PD, existing connections are killed after PD lost connection for long time. + +5. TiDB with PD, new connections are not accepted after PD lost connection for long time. + +6. TiDB with PD, new connections are accepted after PD lost connection for long time and then recovered. + +7. TiDB with PD, connections can be killed (see 3) after PD lost connection for long time and then recovered. + + +## How it works + +* TiDB is built by [Makefile](https://github.com/pingcap/tidb/blob/master/tests/globalkilltest/Makefile), to hack some timeout variables, as the default value of these variables are too long _(several hours)_ for automated testing. + +* Execute `SELECT SLEEP(x)` as payload, and kill the query before `x` expired. If the query had no error and elapsed less than `x`, the test is PASSED. + +* Run a embedded [tcp proxy](https://github.com/inetaf/tcpproxy) before PD. Stop & restart the proxy to simulate connection between TiDB and PD lost & restored. + + +## Usage + +### Regression Execute in Integration Test + +In Integration Test after commit and before merge, run these commands under TiDB `tests/globalkilltest` folder. + +```sh +cd tests/globalkilltest +make +./run-tests.sh --pd= +``` + +Again, before testing, establish a cluster with PD & TiKV and provide `pd client path` by `--pd=`. + +### Manual Test + +Run a single test manually (take `TestMultipleTiDB` as example): + +```sh +cd tests/globalkilltest +make +go test -check.f TestMultipleTiDB -args --pd= +``` diff --git a/tests/globalkilltest/global_kill_test.go b/tests/globalkilltest/global_kill_test.go new file mode 100644 index 0000000000000..0f481eaa24cbd --- /dev/null +++ b/tests/globalkilltest/global_kill_test.go @@ -0,0 +1,509 @@ +// Copyright 2020 PingCAP, Inc. +// +// 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, +// See the License for the specific language governing permissions and +// limitations under the License. + +package globalkilltest + +import ( + "context" + "database/sql" + "flag" + "fmt" + "net/url" + "os" + "os/exec" + "strings" + "testing" + "time" + + _ "github.com/go-sql-driver/mysql" + "github.com/juju/errors" + . "github.com/pingcap/check" + zaplog "github.com/pingcap/log" + "github.com/pingcap/tidb/util/logutil" + log "github.com/sirupsen/logrus" + "go.etcd.io/etcd/clientv3" + "go.uber.org/zap" + "google.golang.org/grpc" +) + +func TestGlobalKill(t *testing.T) { + CustomVerboseFlag = true + TestingT(t) +} + +var ( + logLevel = flag.String("L", "info", "test log level") + serverLogLevel = flag.String("server_log_level", "info", "server log level") + tmpPath = flag.String("tmp", "/tmp/tidb_globalkilltest", "temporary files path") + + tidbBinaryPath = flag.String("s", "bin/globalkilltest_tidb-server", "tidb server binary path") + tidbStartPort = flag.Int("tidb_start_port", 5000, "first tidb server listening port") + tidbStatusPort = flag.Int("tidb_status_port", 8000, "first tidb server status port") + + pdClientPath = flag.String("pd", "127.0.0.1:2379", "pd client path") + pdProxyPort = flag.String("pd_proxy_port", "3379", "pd proxy port") + + lostConnectionToPDTimeout = flag.Int("conn_lost", 5, "lost connection to PD timeout, should be the same as TiDB ldflag ") + timeToCheckPDConnectionRestored = flag.Int("conn_restored", 1, "time to check PD connection restored, should be the same as TiDB ldflag ") +) + +const ( + waitToStartup = 500 * time.Millisecond + msgErrConnectPD = "connect PD err: %v. Establish a cluster with PD & TiKV, and provide PD client path by `--pd=[,]" +) + +var _ = Suite(&TestGlobalKillSuite{}) + +// TestGlobakKillSuite is used for automated test of "Global Kill" feature. +// See https://github.com/pingcap/tidb/blob/master/docs/design/2020-06-01-global-kill.md. +type TestGlobalKillSuite struct { + pdCli *clientv3.Client + pdErr error +} + +func (s *TestGlobalKillSuite) SetUpSuite(c *C) { + logutil.InitLogger(&logutil.LogConfig{Config: zaplog.Config{Level: *logLevel}}) + + s.pdCli, s.pdErr = s.connectPD() +} + +func (s *TestGlobalKillSuite) TearDownSuite(c *C) { + if s.pdCli != nil { + s.pdCli.Close() + } +} + +func (s *TestGlobalKillSuite) connectPD() (cli *clientv3.Client, err error) { + etcdLogCfg := zap.NewProductionConfig() + etcdLogCfg.Level = zap.NewAtomicLevelAt(zap.ErrorLevel) + cli, err = clientv3.New(clientv3.Config{ + LogConfig: &etcdLogCfg, + Endpoints: strings.Split(*pdClientPath, ","), + AutoSyncInterval: 30 * time.Second, + DialTimeout: 5 * time.Second, + DialOptions: []grpc.DialOption{ + grpc.WithBackoffMaxDelay(time.Second * 3), + }, + }) + if err != nil { + return nil, errors.Trace(err) + } + + ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) // use `Sync` to test connection, and get current members. + err = cli.Sync(ctx) + cancel() + if err != nil { + cli.Close() + return nil, errors.Trace(err) + } + log.Infof("pd connected") + return cli, nil +} + +func (s *TestGlobalKillSuite) startTiDBWithoutPD(port int, statusPort int) (cmd *exec.Cmd, err error) { + cmd = exec.Command(*tidbBinaryPath, + "--store=mocktikv", + fmt.Sprintf("-L=%s", *serverLogLevel), + fmt.Sprintf("--path=%s/mocktikv", *tmpPath), + fmt.Sprintf("-P=%d", port), + fmt.Sprintf("--status=%d", statusPort), + fmt.Sprintf("--log-file=%s/tidb%d.log", *tmpPath, port)) + log.Infof("starting tidb: %v", cmd) + err = cmd.Start() + if err != nil { + return nil, errors.Trace(err) + } + time.Sleep(500 * time.Millisecond) + return cmd, nil +} + +func (s *TestGlobalKillSuite) startTiDBWithPD(port int, statusPort int, pdPath string) (cmd *exec.Cmd, err error) { + cmd = exec.Command(*tidbBinaryPath, + "--store=tikv", + fmt.Sprintf("-L=%s", *serverLogLevel), + fmt.Sprintf("--path=%s", pdPath), + fmt.Sprintf("-P=%d", port), + fmt.Sprintf("--status=%d", statusPort), + fmt.Sprintf("--log-file=%s/tidb%d.log", *tmpPath, port)) + log.Infof("starting tidb: %v", cmd) + err = cmd.Start() + if err != nil { + return nil, errors.Trace(err) + } + time.Sleep(500 * time.Millisecond) + return cmd, nil +} + +func (s *TestGlobalKillSuite) stopService(name string, cmd *exec.Cmd, graceful bool) (err error) { + if graceful { + if err = cmd.Process.Signal(os.Interrupt); err != nil { + return errors.Trace(err) + } + if err = cmd.Wait(); err != nil { + return errors.Trace(err) + } + log.Infof("service \"%s\" stopped gracefully", name) + return nil + } + + if err = cmd.Process.Kill(); err != nil { + return errors.Trace(err) + } + time.Sleep(1 * time.Second) + log.Infof("service \"%s\" killed", name) + return nil +} + +func (s *TestGlobalKillSuite) startPDProxy() (proxy *pdProxy, err error) { + from := fmt.Sprintf(":%s", *pdProxyPort) + if len(s.pdCli.Endpoints()) == 0 { + return nil, errors.New("PD no available endpoint") + } + u, err := url.Parse(s.pdCli.Endpoints()[0]) // use first endpoint, as proxy can accept ONLY one destination. + if err != nil { + return nil, errors.Trace(err) + } + dst := u.Host + + var p pdProxy + p.AddRoute(from, to(dst)) + if err := p.Start(); err != nil { + return nil, err + } + log.Infof("start PD proxy: %s --> %s", from, dst) + return &p, nil +} + +func (s *TestGlobalKillSuite) connectTiDB(port int) (db *sql.DB, err error) { + addr := fmt.Sprintf("127.0.0.1:%d", port) + dsn := fmt.Sprintf("root@(%s)/test", addr) + sleepTime := 250 * time.Millisecond + startTime := time.Now() + for i := 0; i < 5; i++ { + db, err = sql.Open("mysql", dsn) + if err != nil { + log.Warnf("open addr %v failed, retry count %d err %v", addr, i, err) + continue + } + err = db.Ping() + if err == nil { + break + } + log.Warnf("ping addr %v failed, retry count %d err %v", addr, i, err) + + db.Close() + time.Sleep(sleepTime) + sleepTime += sleepTime + } + if err != nil { + log.Errorf("connect to server addr %v failed %v, take time %v", addr, err, time.Since(startTime)) + return nil, errors.Trace(err) + } + db.SetMaxOpenConns(10) + + log.Infof("connect to server %s ok", addr) + return db, nil +} + +type sleepResult struct { + elapsed time.Duration + err error +} + +func (s *TestGlobalKillSuite) killByCtrlC(c *C, port int, sleepTime int) time.Duration { + cli := exec.Command("mysql", + "-h127.0.0.1", + fmt.Sprintf("-P%d", port), + "-uroot", + "-e", fmt.Sprintf("SELECT SLEEP(%d);", sleepTime)) + log.Infof("run mysql cli: %v", cli) + + ch := make(chan sleepResult) + go func() { + startTS := time.Now() + err := cli.Run() + if err != nil { + ch <- sleepResult{err: errors.Trace(err)} + return + } + + elapsed := time.Since(startTS) + log.Infof("mysql cli takes: %v", elapsed) + ch <- sleepResult{elapsed: elapsed} + }() + + time.Sleep(waitToStartup) // wait before mysql cli running. + err := cli.Process.Signal(os.Interrupt) // send "CTRL-C". + c.Assert(err, IsNil) + + r := <-ch + c.Assert(r.err, IsNil) + return r.elapsed +} + +func sleepRoutine(ctx context.Context, sleepTime int, conn *sql.Conn, connID uint64, ch chan<- sleepResult) { + var err error + startTS := time.Now() + sql := fmt.Sprintf("SELECT SLEEP(%d);", sleepTime) + if connID > 0 { + log.Infof("exec: %s [on 0x%x]", sql, connID) + } else { + log.Infof("exec: %s", sql) + } + rows, err := conn.QueryContext(ctx, sql) + if err != nil { + ch <- sleepResult{err: err} + return + } + defer rows.Close() + if rows.Err() != nil { + ch <- sleepResult{err: rows.Err()} + return + } + + elapsed := time.Since(startTS) + log.Infof("sleepRoutine takes %v", elapsed) + ch <- sleepResult{elapsed: elapsed} +} + +// NOTICE: db1 & db2 can be the same object, for getting conn1 & conn2 from the same TiDB instance. +func (s *TestGlobalKillSuite) killByKillStatement(c *C, db1 *sql.DB, db2 *sql.DB, sleepTime int) time.Duration { + ctx := context.TODO() + + conn1, err := db1.Conn(ctx) + c.Assert(err, IsNil) + defer conn1.Close() + + var connID1 uint64 + err = conn1.QueryRowContext(ctx, "SELECT CONNECTION_ID();").Scan(&connID1) + c.Assert(err, IsNil) + log.Infof("connID1: 0x%x", connID1) + + ch := make(chan sleepResult) + go sleepRoutine(ctx, sleepTime, conn1, connID1, ch) + + time.Sleep(waitToStartup) // wait go-routine to start. + conn2, err := db2.Conn(ctx) + c.Assert(err, IsNil) + defer conn2.Close() + + var connID2 uint64 + err = conn2.QueryRowContext(ctx, "SELECT CONNECTION_ID();").Scan(&connID2) + c.Assert(err, IsNil) + log.Infof("connID2: 0x%x", connID2) + + log.Infof("exec: KILL QUERY %v(0x%x) [on 0x%x]", connID1, connID1, connID2) + _, err = conn2.ExecContext(ctx, fmt.Sprintf("KILL QUERY %v", connID1)) + c.Assert(err, IsNil) + + r := <-ch + c.Assert(r.err, IsNil) + return r.elapsed +} + +// [Test Scenario 1] A TiDB without PD, killed by Ctrl+C, and killed by KILL. +func (s *TestGlobalKillSuite) TestWithoutPD(c *C) { + var err error + port := *tidbStartPort + tidb, err := s.startTiDBWithoutPD(port, *tidbStatusPort) + c.Assert(err, IsNil) + defer s.stopService("tidb", tidb, true) + + db, err := s.connectTiDB(port) + c.Assert(err, IsNil) + defer db.Close() + + const sleepTime = 2 + + // Test mysql client CTRL-C + // mysql client "CTRL-C" truncate connection id to 32bits, and is ignored by TiDB. + elapsed := s.killByCtrlC(c, port, sleepTime) + c.Assert(elapsed, GreaterEqual, sleepTime*time.Second) + + // Test KILL statement + elapsed = s.killByKillStatement(c, db, db, sleepTime) + c.Assert(elapsed, Less, sleepTime*time.Second) +} + +// [Test Scenario 2] One TiDB with PD, killed by Ctrl+C, and killed by KILL. +func (s *TestGlobalKillSuite) TestOneTiDB(c *C) { + c.Assert(s.pdErr, IsNil, Commentf(msgErrConnectPD, s.pdErr)) + + port := *tidbStartPort + 1 + tidb, err := s.startTiDBWithPD(port, *tidbStatusPort+1, *pdClientPath) + c.Assert(err, IsNil) + defer s.stopService("tidb", tidb, true) + + db, err := s.connectTiDB(port) + c.Assert(err, IsNil) + defer db.Close() + + const sleepTime = 2 + + // Test mysql client CTRL-C + // mysql client "CTRL-C" truncate connection id to 32bits, and is ignored by TiDB. + // see TiDB's logging for the truncation warning. + elapsed := s.killByCtrlC(c, port, sleepTime) + c.Assert(elapsed, GreaterEqual, sleepTime*time.Second) + + // Test KILL statement + elapsed = s.killByKillStatement(c, db, db, sleepTime) + c.Assert(elapsed, Less, sleepTime*time.Second) +} + +// [Test Scenario 3] Multiple TiDB nodes, killed {local,remote} by {Ctrl-C,KILL}. +func (s *TestGlobalKillSuite) TestMultipleTiDB(c *C) { + c.Assert(s.pdErr, IsNil, Commentf(msgErrConnectPD, s.pdErr)) + + // tidb1 & conn1a,conn1b + port1 := *tidbStartPort + 1 + tidb1, err := s.startTiDBWithPD(port1, *tidbStatusPort+1, *pdClientPath) + c.Assert(err, IsNil) + defer s.stopService("tidb1", tidb1, true) + + db1a, err := s.connectTiDB(port1) + c.Assert(err, IsNil) + defer db1a.Close() + + db1b, err := s.connectTiDB(port1) + c.Assert(err, IsNil) + defer db1b.Close() + + // tidb2 & conn2 + port2 := *tidbStartPort + 2 + tidb2, err := s.startTiDBWithPD(port2, *tidbStatusPort+2, *pdClientPath) + c.Assert(err, IsNil) + defer s.stopService("tidb2", tidb2, true) + + db2, err := s.connectTiDB(port2) + c.Assert(err, IsNil) + defer db2.Close() + + const sleepTime = 2 + var elapsed time.Duration + + // kill local by CTRL-C + // mysql client "CTRL-C" truncate connection id to 32bits, and is ignored by TiDB. + // see TiDB's logging for the truncation warning. + elapsed = s.killByCtrlC(c, port1, sleepTime) + c.Assert(elapsed, GreaterEqual, sleepTime*time.Second) + + // kill local by KILL + elapsed = s.killByKillStatement(c, db1a, db1b, sleepTime) + c.Assert(elapsed, Less, sleepTime*time.Second) + + // kill remotely + elapsed = s.killByKillStatement(c, db1a, db2, sleepTime) + c.Assert(elapsed, Less, sleepTime*time.Second) +} + +func (s *TestGlobalKillSuite) TestLostConnection(c *C) { + c.Assert(s.pdErr, IsNil, Commentf(msgErrConnectPD, s.pdErr)) + + // PD proxy + pdProxy, err := s.startPDProxy() + c.Assert(err, IsNil) + pdPath := fmt.Sprintf("127.0.0.1:%s", *pdProxyPort) + + // tidb1 + port1 := *tidbStartPort + 1 + tidb1, err := s.startTiDBWithPD(port1, *tidbStatusPort+1, pdPath) + c.Assert(err, IsNil) + defer s.stopService("tidb1", tidb1, true) + + db1, err := s.connectTiDB(port1) + c.Assert(err, IsNil) + defer db1.Close() + + // tidb2 + port2 := *tidbStartPort + 2 + tidb2, err := s.startTiDBWithPD(port2, *tidbStatusPort+2, pdPath) + c.Assert(err, IsNil) + defer s.stopService("tidb2", tidb2, true) + + db2, err := s.connectTiDB(port2) + c.Assert(err, IsNil) + defer db2.Close() + + // verify it's working. + ctx := context.TODO() + conn1, err := db1.Conn(ctx) + c.Assert(err, IsNil) + defer conn1.Close() + err = conn1.PingContext(ctx) + c.Assert(err, IsNil) + + // a running sql + sqlTime := *lostConnectionToPDTimeout + 10 + ch := make(chan sleepResult) + go sleepRoutine(ctx, sqlTime, conn1, 0, ch) + time.Sleep(waitToStartup) // wait go-routine to start. + + // disconnect to PD by closing PD proxy. + log.Infof("shutdown PD proxy to simulate lost connection to PD.") + pdProxy.Close() + pdProxy.closeAllConnections() + + // wait for "lostConnectionToPDTimeout" elapsed. + // delay additional 3 seconds for TiDB would have a small interval to detect lost connection more than "lostConnectionToPDTimeout". + sleepTime := time.Duration(*lostConnectionToPDTimeout+3) * time.Second + log.Infof("sleep %v to wait for TiDB had detected lost connection", sleepTime) + time.Sleep(sleepTime) + + // check running sql + // [Test Scenario 4] Existing connections are killed after PD lost connection for long time. + r := <-ch + log.Infof("sleepRoutine err: %v", r.err) + c.Assert(r.err, NotNil) + c.Assert(r.err.Error(), Equals, "invalid connection") + + // check new connection. + // [Test Scenario 5] New connections are not accepted after PD lost connection for long time. + log.Infof("check connection after lost connection to PD.") + _, err = s.connectTiDB(port1) + log.Infof("connectTiDB err: %v", err) + c.Assert(err, NotNil) + c.Assert(err.Error(), Equals, "driver: bad connection") + + // start PD proxy to restore connection. + log.Infof("restart pdProxy") + pdProxy1, err := s.startPDProxy() + c.Assert(err, IsNil) + defer pdProxy1.Close() + + // wait for "timeToCheckPDConnectionRestored" elapsed. + // delay additional 3 seconds for TiDB would have a small interval to detect lost connection restored more than "timeToCheckPDConnectionRestored". + sleepTime = time.Duration(*timeToCheckPDConnectionRestored+3) * time.Second + log.Infof("sleep %v to wait for TiDB had detected lost connection restored", sleepTime) + time.Sleep(sleepTime) + + // check restored + { + // [Test Scenario 6] New connections are accepted after PD lost connection for long time and then recovered. + db1, err := s.connectTiDB(port1) + c.Assert(err, IsNil) + defer db1.Close() + + db2, err := s.connectTiDB(port2) + c.Assert(err, IsNil) + defer db2.Close() + + // [Test Scenario 7] Connections can be killed after PD lost connection for long time and then recovered. + sleepTime := 2 + elapsed := s.killByKillStatement(c, db1, db1, sleepTime) + c.Assert(elapsed, Less, time.Duration(sleepTime)*time.Second) + + elapsed = s.killByKillStatement(c, db1, db2, sleepTime) + c.Assert(elapsed, Less, time.Duration(sleepTime)*time.Second) + } +} diff --git a/tests/globalkilltest/go.mod b/tests/globalkilltest/go.mod new file mode 100644 index 0000000000000..c879e206adaff --- /dev/null +++ b/tests/globalkilltest/go.mod @@ -0,0 +1,17 @@ +module github.com/pingcap/tests/globalkilltest + +go 1.13 + +require ( + github.com/go-sql-driver/mysql v1.5.0 + github.com/juju/errors v0.0.0-20200330140219-3fe23663418f + github.com/pingcap/check v0.0.0-20200212061837-5e12011dc712 + github.com/pingcap/log v0.0.0-20200828042413-fce0951f1463 + github.com/pingcap/tidb v1.1.0-beta.0.20201020170636-b71b6323fd4d + github.com/pingcap/tipb v0.0.0-20201020032630-6dac8b6c0aab // indirect + github.com/sirupsen/logrus v1.6.0 + go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738 + go.uber.org/zap v1.16.0 + google.golang.org/grpc v1.26.0 + inet.af/tcpproxy v0.0.0-20200125044825-b6bb9b5b8252 +) diff --git a/tests/globalkilltest/go.sum b/tests/globalkilltest/go.sum new file mode 100644 index 0000000000000..f8902b2fecae0 --- /dev/null +++ b/tests/globalkilltest/go.sum @@ -0,0 +1,869 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0 h1:0E3eE8MX426vUOs7aHfI7aN1BrIzzzf4ccKCSfSjGmc= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0 h1:sAbMqjY1PEQKZBWfbu6Y6bsupJ9c4QdHnzg/VvYTLcE= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0 h1:9/vpR43S4aJaROxqQHQ3nH9lfyKKV0dC3vOmnw8ebQQ= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0 h1:RPUcBvDeYgQFMfQu1eBMq6piD1SXmLH+vK3qjewZPus= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/HdrHistogram/hdrhistogram-go v0.9.0 h1:dpujRju0R4M/QZzcnR1LH1qm+TVG3UzkWdp5tH1WMcg= +github.com/HdrHistogram/hdrhistogram-go v0.9.0/go.mod h1:nxrse8/Tzg2tg3DZcZjm6qEclQKK70g0KxO61gFFZD4= +github.com/Jeffail/gabs/v2 v2.5.1 h1:ANfZYjpMlfTTKebycu4X1AgkVWumFVDYQl7JwOr4mDk= +github.com/Jeffail/gabs/v2 v2.5.1/go.mod h1:xCn81vdHKxFUuWWAaD5jCTQDNPBMh5pPs9IJ+NcziBI= +github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= +github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM= +github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= +github.com/VividCortex/mysqlerr v0.0.0-20200629151747-c28746d985dd/go.mod h1:f3HiCrHjHBdcm6E83vGaXh1KomZMA2P6aeo3hKx/wg0= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/appleboy/gin-jwt/v2 v2.6.3/go.mod h1:MfPYA4ogzvOcVkRwAxT7quHOtQmVKDpTwxyUrC2DNw0= +github.com/appleboy/gofight/v2 v2.1.2/go.mod h1:frW+U1QZEdDgixycTj4CygQ48yLTUhplt43+Wczp3rw= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/aws/aws-sdk-go v1.30.24 h1:y3JPD51VuEmVqN3BEDVm4amGpDma2cKJcDPuAU1OR58= +github.com/aws/aws-sdk-go v1.30.24/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/blacktear23/go-proxyprotocol v0.0.0-20180807104634-af7a81e8dd0d h1:rQlvB2AYWme2bIB18r/SipGiMEVJYE9U0z+MGoU/LtQ= +github.com/blacktear23/go-proxyprotocol v0.0.0-20180807104634-af7a81e8dd0d/go.mod h1:VKt7CNAQxpFpSDz3sXyj9hY/GbVsQCr0sB3w59nE7lU= +github.com/cakturk/go-netstat v0.0.0-20200220111822-e5b49efee7a5 h1:BjkPE3785EwPhhyuFkbINB+2a1xATwk8SNDWnJiD41g= +github.com/cakturk/go-netstat v0.0.0-20200220111822-e5b49efee7a5/go.mod h1:jtAfVaU/2cu1+wdSRPWE2c1N2qeAA3K4RH9pYgqwets= +github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheggaaa/pb/v3 v3.0.4 h1:QZEPYOj2ix6d5oEg63fbHmpolrnNiwjUsk+h74Yt4bM= +github.com/cheggaaa/pb/v3 v3.0.4/go.mod h1:7rgWxLrAUcFMkvJuv09+DYi7mMUYi8nO9iOWcvGJPfw= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.9.0 h1:9GjrtRI+mLEFPtTfR/AZhcxp+Ii8NZYWq5104FbZQY0= +github.com/codahale/hdrhistogram v0.9.0/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coocood/bbloom v0.0.0-20190830030839-58deb6228d64 h1:W1SHiII3e0jVwvaQFglwu3kS9NLxOeTpvik7MbKCyuQ= +github.com/coocood/bbloom v0.0.0-20190830030839-58deb6228d64/go.mod h1:F86k/6c7aDUdwSUevnLpHS/3Q9hzYCE99jGk2xsHnt0= +github.com/coocood/rtutil v0.0.0-20190304133409-c84515f646f2 h1:NnLfQ77q0G4k2Of2c1ceQ0ec6MkLQyDp+IGdVM0D8XM= +github.com/coocood/rtutil v0.0.0-20190304133409-c84515f646f2/go.mod h1:7qG7YFnOALvsx6tKTNmQot8d7cGFXM9TidzvRFLWYwM= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/corona10/goimagehash v1.0.2/go.mod h1:/l9umBhvcHQXVtQO1V6Gp1yD20STawkhRnnX0D1bvVI= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cznic/golex v0.0.0-20181122101858-9c343928389c/go.mod h1:+bmmJDNmKlhWNG+gwWCkaBoTy39Fs+bzRxVBzoTQbIc= +github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 h1:iwZdTE0PVqJCos1vaoKsclOGD3ADKpshg3SRtYBbwso= +github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= +github.com/cznic/parser v0.0.0-20160622100904-31edd927e5b1/go.mod h1:2B43mz36vGZNZEwkWi8ayRSSUXLfjL8OkbzwW4NcPMM= +github.com/cznic/sortutil v0.0.0-20181122101858-f5f958428db8 h1:LpMLYGyy67BoAFGda1NeOBQwqlv7nUXpm+rIVHGxZZ4= +github.com/cznic/sortutil v0.0.0-20181122101858-f5f958428db8/go.mod h1:q2w6Bg5jeox1B+QkJ6Wp/+Vn0G/bo3f1uY7Fn3vivIQ= +github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc= +github.com/cznic/y v0.0.0-20170802143616-045f81c6662a/go.mod h1:1rk5VM7oSnA4vjp+hrLQ3HWHa+Y4yPCa3/CsJrcNnvs= +github.com/danjacques/gofslock v0.0.0-20191023191349-0a45f885bc37 h1:X6mKGhCFOxrKeeHAjv/3UvT6e5RRxW6wRdlqlV6/H4w= +github.com/danjacques/gofslock v0.0.0-20191023191349-0a45f885bc37/go.mod h1:DC3JtzuG7kxMvJ6dZmf2ymjNyoXwgtklr7FN+Um2B0U= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/dgraph-io/ristretto v0.0.1 h1:cJwdnj42uV8Jg4+KLrYovLiCgIfz9wtWm6E6KA+1tLs= +github.com/dgraph-io/ristretto v0.0.1/go.mod h1:T40EBc7CJke8TkpiYfGGKAeFjSaxuFXhuXRyumBd6RE= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/frankban/quicktest v1.11.1 h1:stwUsXhUGliQs9t0ZS39BWCltFdOHgABiIlihop8AD4= +github.com/frankban/quicktest v1.11.1/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsouza/fake-gcs-server v1.17.0 h1:OeH75kBZcZa3ZE+zz/mFdJ2btt9FgqfjI7gIh9+5fvk= +github.com/fsouza/fake-gcs-server v1.17.0/go.mod h1:D1rTE4YCyHFNa99oyJJ5HyclvN/0uQR+pM/VdlL83bw= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/gzip v0.0.1/go.mod h1:fGBJBCdt6qCZuCAOwWuFhBB4OOq9EFqlo5dEaFhhu5w= +github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= +github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.3.0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y= +github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= +github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= +github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= +github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= +github.com/go-playground/overalls v0.0.0-20180201144345-22ec1a223b7c/go.mod h1:UqxAgEOt89sCiXlrc/ycnx00LVvUO/eS8tMUkWX4R7w= +github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/goccy/go-graphviz v0.0.5/go.mod h1:wXVsXxmyMQU6TN3zGRttjNn3h+iCAS7xQFC6TlNvLhk= +github.com/gogo/protobuf v0.0.0-20180717141946-636bf0302bc9/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v0.0.0-20180814211427-aa810b61a9c7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.4 h1:87PNWwrRvUSnqS4dlcBU/ftvOIBep4sYuBLlh6rX2wk= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20200407044318-7d83b28da2e9 h1:K+lX49/3eURCE1IjlaZN//u6c+9nfDAMnyQ9E2dsJbY= +github.com/google/pprof v0.0.0-20200407044318-7d83b28da2e9/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf/go.mod h1:RpwtwJQFrIEPstU94h88MWPXP2ektJZ8cZ0YntAmXiE= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gorilla/handlers v1.4.2 h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg= +github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.12.1 h1:zCy2xE9ablevUOrUZc3Dl72Dt+ya2FNAvC2yLYMHzi4= +github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= +github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69/go.mod h1:YLEMZOtU+AZ7dhN9T/IpGhXVGly2bvkJQ+zxj3WeVQo= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hypnoglow/gormzap v0.3.0/go.mod h1:5Wom8B7Jl2oK0Im9hs6KQ+Kl92w4Y7gKCrj66rhyvw0= +github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334 h1:VHgatEHNcBFEB7inlalqfNqw65aNkM1lGX2yt3NmbS8= +github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jinzhu/gorm v1.9.12/go.mod h1:vhTjlKSJUTWNtcbQtrMBFCxy7eXTzeCAzfL5fBZT/Qs= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc= +github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/joomcode/errorx v1.0.1/go.mod h1:kgco15ekB6cs+4Xjzo7SPeXzx38PbJzBwbnu9qfVNHQ= +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/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/juju/ansiterm v0.0.0-20160907234532-b99631de12cf/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU= +github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c/go.mod h1:nD0vlnrUjcjJhqN5WuCWZyzfd5AHZAC9/ajvbSx69xA= +github.com/juju/cmd v0.0.0-20171107070456-e74f39857ca0/go.mod h1:yWJQHl73rdSX4DHVKGqkAip+huBslxRwS8m9CrOLq18= +github.com/juju/collections v0.0.0-20200605021417-0d0ec82b7271/go.mod h1:5XgO71dV1JClcOJE+4dzdn4HrI5LiyKd7PlVG6eZYhY= +github.com/juju/errors v0.0.0-20150916125642-1b5e39b83d18/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= +github.com/juju/errors v0.0.0-20200330140219-3fe23663418f h1:MCOvExGLpaSIzLYB4iQXEHP4jYVU6vmzLNQPdMVrxnM= +github.com/juju/errors v0.0.0-20200330140219-3fe23663418f/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= +github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= +github.com/juju/httpprof v0.0.0-20141217160036-14bf14c30767/go.mod h1:+MaLYz4PumRkkyHYeXJ2G5g5cIW0sli2bOfpmbaMV/g= +github.com/juju/loggo v0.0.0-20170605014607-8232ab8918d9/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= +github.com/juju/loggo v0.0.0-20200526014432-9ce3a2e09b5e h1:FdDd7bdI6cjq5vaoYlK1mfQYfF9sF2VZw8VEZMsl5t8= +github.com/juju/loggo v0.0.0-20200526014432-9ce3a2e09b5e/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= +github.com/juju/mutex v0.0.0-20171110020013-1fe2a4bf0a3a/go.mod h1:Y3oOzHH8CQ0Ppt0oCKJ2JFO81/EsWenH5AEqigLH+yY= +github.com/juju/ratelimit v1.0.1 h1:+7AIFJVQ0EQgq/K9+0Krm7m530Du7tIz0METWzN0RgY= +github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= +github.com/juju/retry v0.0.0-20151029024821-62c620325291/go.mod h1:OohPQGsr4pnxwD5YljhQ+TZnuVRYpa5irjugL1Yuif4= +github.com/juju/retry v0.0.0-20180821225755-9058e192b216/go.mod h1:OohPQGsr4pnxwD5YljhQ+TZnuVRYpa5irjugL1Yuif4= +github.com/juju/testing v0.0.0-20180402130637-44801989f0f7/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= +github.com/juju/testing v0.0.0-20190723135506-ce30eb24acd2/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= +github.com/juju/testing v0.0.0-20200923013621-75df6121fbb0 h1:ZNHhUeJYnc98o0ZpU7/c2TBuQokG5TBiDx8UvhDTIt0= +github.com/juju/testing v0.0.0-20200923013621-75df6121fbb0/go.mod h1:Ky6DwobyXXeXSqRJCCuHpAtVEGRPOT8gUsFpJhDoXZ8= +github.com/juju/utils v0.0.0-20180424094159-2000ea4ff043/go.mod h1:6/KLg8Wz/y2KVGWEpkK9vMNGkOnu4k/cqs8Z1fKjTOk= +github.com/juju/utils v0.0.0-20200116185830-d40c2fe10647/go.mod h1:6/KLg8Wz/y2KVGWEpkK9vMNGkOnu4k/cqs8Z1fKjTOk= +github.com/juju/utils/v2 v2.0.0-20200923005554-4646bfea2ef1/go.mod h1:fdlDtQlzundleLLz/ggoYinEt/LmnrpNKcNTABQATNI= +github.com/juju/version v0.0.0-20161031051906-1f41e27e54f2/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U= +github.com/juju/version v0.0.0-20180108022336-b64dbd566305/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U= +github.com/juju/version v0.0.0-20191219164919-81c1be00b9a6/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U= +github.com/julienschmidt/httprouter v1.1.1-0.20151013225520-77a895ad01eb/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +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= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.9.5 h1:U+CaK85mrNNb4k8BNOfgJtJ/gr6kswUCFj6miSzVC6M= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w= +github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= +github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lunixbochs/vtclean v0.0.0-20160125035106-4fbf7632a2c6/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/masterzen/azure-sdk-for-go v3.2.0-beta.0.20161014135628-ee4f0065d00c+incompatible/go.mod h1:mf8fjOu33zCqxUjuiU3I8S1lJMyEAlH+0F2+M5xl3hE= +github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= +github.com/masterzen/winrm v0.0.0-20161014151040-7a535cd943fc/go.mod h1:CfZSN7zwz5gJiFhZJz49Uzk7mEBHIceWmbFmYx7Hf7E= +github.com/masterzen/xmlpath v0.0.0-20140218185901-13f4951698ad/go.mod h1:A0zPC53iKKKcXYxr4ROjpQRQ5FgJXtelNdSmHHuq/tY= +github.com/mattn/go-colorable v0.0.6/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.0-20160806122752-66b8e73f3f5c/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11 h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= +github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/mattn/go-sqlite3 v2.0.1+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= +github.com/mgechev/revive v1.0.2/go.mod h1:rb0dQy1LVAxW9SWy5R3LPUjevzUbUS316U5MFySA2lo= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +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/montanaflynn/stats v0.0.0-20151014174947-eeaced052adb h1:bsjNADsjHq0gjU7KO7zwoX5k3HtFdf6TDzB3ncl5iUs= +github.com/montanaflynn/stats v0.0.0-20151014174947-eeaced052adb/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/ncw/directio v1.0.4 h1:CojwI07mCEmRkajgx42Pf8jyCwTs1ji9/Ij9/PJG12k= +github.com/ncw/directio v1.0.4/go.mod h1:CKGdcN7StAaqjT7Qack3lAXeX4pjnyc46YeqZH1yWVY= +github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= +github.com/ngaut/pools v0.0.0-20180318154953-b7bc8c42aac7 h1:7KAv7KMGTTqSmYZtNdcNTgsos+vFzULLwyElndwn+5c= +github.com/ngaut/pools v0.0.0-20180318154953-b7bc8c42aac7/go.mod h1:iWMfgwqYW+e8n5lC/jjNEhwcjbRDpl5NT7n2h+4UNcI= +github.com/ngaut/sync2 v0.0.0-20141008032647-7a24ed77b2ef h1:K0Fn+DoFqNqktdZtdV3bPQ/0cuYh2H4rkg0tytX/07k= +github.com/ngaut/sync2 v0.0.0-20141008032647-7a24ed77b2ef/go.mod h1:7WjlapSfwQyo6LNmIvEWzsW1hbBQfpUO4JWnuQRmva8= +github.com/ngaut/unistore v0.0.0-20200929093420-76a7b18be28e h1:1a8YbLM1sBmwEjzEVT/JD12Vjf6BNnBBEUV3nAcZYKU= +github.com/ngaut/unistore v0.0.0-20200929093420-76a7b18be28e/go.mod h1:ZR3NH+HzqfiYetwdoAivApnIy8iefPZHTMLfrFNm8g4= +github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= +github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.2 h1:3mYCb7aPxS/RU7TI1y4rkEn1oKmPRjNJLNEXgw7MH2I= +github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.3.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= +github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d h1:U+PMnTlV2tu7RuMK5etusZG3Cf+rpow5hqQByeCzJ2g= +github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d/go.mod h1:lXfE4PvvTW5xOjO6Mba8zDPyw8M93B6AQ7frTGnMlA8= +github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI= +github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pingcap-incubator/tidb-dashboard v0.0.0-20200908071351-a715a95c7de2/go.mod h1:X3r7/4Wr9fSC5KlsfezBh/5noeWGEJNQuSvjgS2rvdI= +github.com/pingcap/badger v1.5.1-0.20200908111422-2e78ee155d19 h1:IXpGy7y9HyoShAFmzW2OPF0xCA5EOoSTyZHwsgYk9Ro= +github.com/pingcap/badger v1.5.1-0.20200908111422-2e78ee155d19/go.mod h1:LyrqUOHZrUDf9oGi1yoz1+qw9ckSIhQb5eMa1acOLNQ= +github.com/pingcap/br v4.0.0-beta.2.0.20201014031603-5676c8fdad1a+incompatible h1:RMx7D+dQtUTUZjelJyV0WwYr3GFxrjsSarFXhV2SWzI= +github.com/pingcap/br v4.0.0-beta.2.0.20201014031603-5676c8fdad1a+incompatible/go.mod h1:ymVmo50lQydxib0tmK5hHk4oteB7hZ0IMCArunwy3UQ= +github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8/go.mod h1:B1+S9LNcuMyLH/4HMTViQOJevkGiik3wW2AN9zb2fNQ= +github.com/pingcap/check v0.0.0-20191107115940-caf2b9e6ccf4/go.mod h1:PYMCGwN0JHjoqGr3HrZoD+b8Tgx8bKnArhSq8YVzUMc= +github.com/pingcap/check v0.0.0-20191216031241-8a5a85928f12/go.mod h1:PYMCGwN0JHjoqGr3HrZoD+b8Tgx8bKnArhSq8YVzUMc= +github.com/pingcap/check v0.0.0-20200212061837-5e12011dc712 h1:R8gStypOBmpnHEx1qi//SaqxJVI4inOqljg/Aj5/390= +github.com/pingcap/check v0.0.0-20200212061837-5e12011dc712/go.mod h1:PYMCGwN0JHjoqGr3HrZoD+b8Tgx8bKnArhSq8YVzUMc= +github.com/pingcap/errcode v0.0.0-20180921232412-a1a7271709d9/go.mod h1:4b2X8xSqxIroj/IZ9MX/VGZhAwc11wB9wRIzHvz6SeM= +github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pingcap/errors v0.11.5-0.20190809092503-95897b64e011/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pingcap/errors v0.11.5-0.20200902104258-eba4f1d8f6de/go.mod h1:g4vx//d6VakjJ0mk7iLBlKA8LFavV/sAVINT/1PFxeQ= +github.com/pingcap/errors v0.11.5-0.20200917111840-a15ef68f753d h1:TH18wFO5Nq/zUQuWu9ms2urgZnLP69XJYiI2JZAkUGc= +github.com/pingcap/errors v0.11.5-0.20200917111840-a15ef68f753d/go.mod h1:g4vx//d6VakjJ0mk7iLBlKA8LFavV/sAVINT/1PFxeQ= +github.com/pingcap/failpoint v0.0.0-20191029060244-12f4ac2fd11d/go.mod h1:DNS3Qg7bEDhU6EXNHF+XSv/PGznQaMJ5FWvctpm6pQI= +github.com/pingcap/failpoint v0.0.0-20200702092429-9f69995143ce h1:Y1kCxlCtlPTMtVcOkjUcuQKh+YrluSo7+7YMCQSzy30= +github.com/pingcap/failpoint v0.0.0-20200702092429-9f69995143ce/go.mod h1:w4PEZ5y16LeofeeGwdgZB4ddv9bLyDuIX+ljstgKZyk= +github.com/pingcap/fn v0.0.0-20191016082858-07623b84a47d h1:rCmRK0lCRrHMUbS99BKFYhK9YxJDNw0xB033cQbYo0s= +github.com/pingcap/fn v0.0.0-20191016082858-07623b84a47d/go.mod h1:fMRU1BA1y+r89AxUoaAar4JjrhUkVDt0o0Np6V8XbDQ= +github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 h1:surzm05a8C9dN8dIUmo4Be2+pMRb6f55i+UIYrluu2E= +github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989/go.mod h1:O17XtbryoCJhkKGbT62+L2OlrniwqiGLSqrmdHCMzZw= +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-20200810113304-6157337686b1/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= +github.com/pingcap/kvproto v0.0.0-20200827082727-23dedec2339b/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= +github.com/pingcap/kvproto v0.0.0-20200927054727-1290113160f0 h1:yNUYt8kP/fAEhNi7wUfU0pvk6ZgoEHgJIyeM/CTeS3g= +github.com/pingcap/kvproto v0.0.0-20200927054727-1290113160f0/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-20200117041106-d28c14d3b1cd/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= +github.com/pingcap/log v0.0.0-20200511115504-543df19646ad/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= +github.com/pingcap/log v0.0.0-20200828042413-fce0951f1463 h1:Jboj+s4jSCp5E1WDgmRUv5rIFKFHaaSWuSZ4wMwXIcc= +github.com/pingcap/log v0.0.0-20200828042413-fce0951f1463/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= +github.com/pingcap/parser v0.0.0-20201014065945-fb6bde872a79 h1:Dcxi/lDJ6C3M5ocRbhR66MBDMmqFkPVt/Y79DVb5QR8= +github.com/pingcap/parser v0.0.0-20201014065945-fb6bde872a79/go.mod h1:RlLfMRJwFBSiXd2lUaWdV5pSXtrpyvZM8k5bbZWsheU= +github.com/pingcap/sysutil v0.0.0-20200206130906-2bfa6dc40bcd/go.mod h1:EB/852NMQ+aRKioCpToQ94Wl7fktV+FNnxf3CX/TTXI= +github.com/pingcap/sysutil v0.0.0-20200715082929-4c47bcac246a h1:i2RElJ2aykSqZKeY+3SK18NHhajil8cQdG77wHe+P1Y= +github.com/pingcap/sysutil v0.0.0-20200715082929-4c47bcac246a/go.mod h1:EB/852NMQ+aRKioCpToQ94Wl7fktV+FNnxf3CX/TTXI= +github.com/pingcap/tidb v1.1.0-beta.0.20201020170636-b71b6323fd4d h1:cud4Np00Bg+jPJttmZAPw4mq/7vDHqCZ5OB6MdAGags= +github.com/pingcap/tidb v1.1.0-beta.0.20201020170636-b71b6323fd4d/go.mod h1:txOcY5994Z1sG1qqTaxNGQQWS6muamDcFp4NW8xTUEc= +github.com/pingcap/tidb-tools v4.0.5-0.20200820092506-34ea90c93237+incompatible h1:qPppnsXVh3KswqRZdSAShGLLPd7dB+5w4lXDnpYn0SQ= +github.com/pingcap/tidb-tools v4.0.5-0.20200820092506-34ea90c93237+incompatible/go.mod h1:XGdcy9+yqlDSEMTpOXnwf3hiTeqrV6MN/u1se9N8yIM= +github.com/pingcap/tipb v0.0.0-20200618092958-4fad48b4c8c3/go.mod h1:RtkHW8WbcNxj8lsbzjaILci01CtYnYbIkQhjyZWrWVI= +github.com/pingcap/tipb v0.0.0-20201020032630-6dac8b6c0aab h1:3BEwEmcbZZuXfaxAhBQykZUzSHQb6G0ix8cvLmshU/4= +github.com/pingcap/tipb v0.0.0-20201020032630-6dac8b6c0aab/go.mod h1:RtkHW8WbcNxj8lsbzjaILci01CtYnYbIkQhjyZWrWVI= +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= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA= +github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237 h1:HQagqIiBmr8YXawX/le3+O26N+vPPC1PtjaF3mwnook= +github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sergi/go-diff v1.0.1-0.20180205163309-da645544ed44/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shirou/gopsutil v2.19.10+incompatible h1:lA4Pi29JEVIQIgATSeftHSY0rMGI9CLrl2ZvDLiahto= +github.com/shirou/gopsutil v2.19.10+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 h1:udFKJ0aHUL60LboW/A+DfgoHVedieIzIXE8uylPue0U= +github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd h1:ug7PpSOB5RBPK1Kg6qskGBoP3Vnj/aNYFTznWvlkGo0= +github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14/go.mod h1:gxQT6pBGRuIGunNf/+tSOB5OHvguWi8Tbt82WOkf35E= +github.com/swaggo/gin-swagger v1.2.0/go.mod h1:qlH2+W7zXGZkczuL+r2nEBR2JTT+/lX05Nn6vPhc7OI= +github.com/swaggo/http-swagger v0.0.0-20200308142732-58ac5e232fba/go.mod h1:O1lAbCgAAX/KZ80LM/OXwtWFI/5TvZlwxSg8Cq08PV0= +github.com/swaggo/swag v1.5.1/go.mod h1:1Bl9F/ZBpVWh22nY0zmYyASPO1lI/zIwRDrpZU+tv8Y= +github.com/swaggo/swag v1.6.3/go.mod h1:wcc83tB4Mb2aNiL/HP4MFeQdpHUrca+Rp/DRNgWAUio= +github.com/swaggo/swag v1.6.6-0.20200529100950-7c765ddd0476/go.mod h1:xDhTyuFIujYiN3DKWC/H/83xcfHp+UE/IzWWampG7Zc= +github.com/syndtr/goleveldb v0.0.0-20180815032940-ae2bd5eed72d h1:4J9HCZVpvDmj2tiKGSTUnb3Ok/9CEQb9oqu9LHKQQpc= +github.com/syndtr/goleveldb v0.0.0-20180815032940-ae2bd5eed72d/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= +github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2 h1:mbAskLJ0oJfDRtkanvQPiooDH8HvJ2FBh+iKT/OmiQQ= +github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2/go.mod h1:2PfKggNGDuadAa0LElHrByyrz4JPZ9fFx6Gs7nx7ZZU= +github.com/tidwall/gjson v1.3.5/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= +github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tikv/pd v1.1.0-beta.0.20200910042021-254d1345be09 h1:5NsHTjk0O7C3/d8vfl/cWu9L6db+8YGvEj7XBGbMTbY= +github.com/tikv/pd v1.1.0-beta.0.20200910042021-254d1345be09/go.mod h1:Z+EQXV6FyfpH7olLqXH0zvYOnFcCNGJmzm+MN4W1/RE= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/twmb/murmur3 v1.1.3 h1:D83U0XYKcHRYwYIpBKf3Pks91Z0Byda/9SJ8B6EMRcA= +github.com/twmb/murmur3 v1.1.3/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= +github.com/uber-go/atomic v1.3.2 h1:Azu9lPBWRNKzYXSIwRfgRuDuS0YKsK4NFhiQv98gkxo= +github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= +github.com/uber/jaeger-client-go v2.22.1+incompatible h1:NHcubEkVbahf9t3p75TOCR83gdUHXjRJvjoBh1yACsM= +github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.4.0+incompatible h1:fY7QsGQWiCt8pajv4r7JEvmATdCVaWxXbjwyYwsNaLQ= +github.com/uber/jaeger-lib v2.4.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.5-pre/go.mod h1:FwP/aQVg39TXzItUBMwnWp9T9gPQnXw4Poh4/oBQZ/0= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.5-pre/go.mod h1:tULtS6Gy1AE1yCENaw4Vb//HLH5njI2tfCQDUqRd8fI= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/unrolled/render v0.0.0-20171102162132-65450fb6b2d3/go.mod h1:tu82oB5W2ykJRVioYsB+IQKcft7ryBr7w12qMBUPyXg= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/urfave/negroni v0.3.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/vmihailenco/msgpack/v4 v4.3.11/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= +github.com/vmihailenco/msgpack/v5 v5.0.0-beta.1/go.mod h1:xlngVLeyQ/Qi05oQxhQ+oTuqa03RjMwMfk/7/TCs+QI= +github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yookoala/realpath v1.0.0/go.mod h1:gJJMA9wuX7AcqLy1+ffPatSCySA1FQ2S8Ya9AIoYBpE= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/zhangjinpeng1987/raft v0.0.0-20200819064223-df31bb68a018 h1:T3OrqVdcH6z6SakR7WkECvGpdkfB0MAur/6zf66GPxQ= +github.com/zhangjinpeng1987/raft v0.0.0-20200819064223-df31bb68a018/go.mod h1:rTSjwgeYU2on64W50csWDlhyy0x9UYVYJUovHlYdt5s= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738 h1:lWF4f9Nypl1ZqSb4gLeh/DGvBYVaUYHuiB93teOmwgc= +go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU= +go.uber.org/dig v1.8.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= +go.uber.org/fx v1.10.0/go.mod h1:vLRicqpG/qQEzno4SYU86iCwfT95EZza+Eba0ItuxqY= +go.uber.org/goleak v0.10.0 h1:G3eWbSNIskeRqtsN/1uI5B+eP73y3JUuBsv9AZjehb4= +go.uber.org/goleak v0.10.0/go.mod h1:VCZuO8V8mFPlL0F5J5GK1rtHV3DrFcQ1R8ryq7FK0aI= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.12.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +golang.org/x/crypto v0.0.0-20180214000028-650f4a345ab4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299 h1:zQpM52jfKHG6II1ISZY1ZcpygvuSFZpLwfluuF89XOg= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180406214816-61147c48b25b/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200904194848-62affa334b73 h1:MXfv8rhZWmFeqX3GNZRsd6vOLoaCHjYEX3qkRo3YBUA= +golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200819171115-d785dc25833f h1:KJuwZVtZBVzDmEDtB2zro9CXkD9O0dpCv4o2LHbQIAw= +golang.org/x/sys v0.0.0-20200819171115-d785dc25833f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606050223-4d9ae51c2468/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190611222205-d73e1c7e250b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191107010934-f79515f33823/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191114200427-caa0b0f7d508/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200225230052-807dcd883420/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200410194907-79a7a3126eef/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200527183253-8e7acdbce89d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac h1:DugppSxw0LSF8lcjaODPJZoDzq0ElTGskTst3ZaBkHI= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.1 h1:5mMS6mYvK5LVB8+ujVBC33Y8gltBo/kT6HBm6kU80G4= +google.golang.org/api v0.15.1/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181004005441-af9cb2a35e7f/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb h1:ADPHZzpzM4tk4V4S5cnCrr5SwzvlrPRmqqCuJDB8UTs= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v0.0.0-20180607172857-7a6a684ca69e/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/alecthomas/gometalinter.v2 v2.0.12/go.mod h1:NDRytsqEZyolNuAgTzJkZMkSQM7FIKyzVzGhjB/qfYo= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20180810215634-df19058c872c/go.mod h1:3HH7i1SgMqlzxCcBmUHW657sD4Kvv9sC3HpL3YukzwA= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20160105164936-4f90aeace3a2/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v1 v1.0.0-20161222125816-442357a80af5/go.mod h1:u0ALmqvLRxLI95fkdCEWrE6mhWYZW1aMOJHp5YXLHTg= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= +gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= +gopkg.in/httprequest.v1 v1.1.1/go.mod h1:/CkavNL+g3qLOrpFHVrEx4NKepeqR4XTZWNj4sGGjz0= +gopkg.in/mgo.v2 v2.0.0-20160818015218-f2b6f6c918c4/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw= +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170712054546-1be3d31502d6/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.6 h1:W18jzjh8mfPez+AwGLxmOImucz/IFjpNlrKVnaj2YVc= +honnef.co/go/tools v0.0.1-2020.1.6/go.mod h1:pyyisuGw24ruLjrr1ddx39WE0y9OooInRzEYLhQB2YY= +inet.af/tcpproxy v0.0.0-20200125044825-b6bb9b5b8252 h1:gmJCKidOfjKDUHF1jjke+I+2iQIyE3HNNxu2OKO/FUI= +inet.af/tcpproxy v0.0.0-20200125044825-b6bb9b5b8252/go.mod h1:zq+R+tLcdHugi7Jt+FtIQY6m6wtX34lr2CdQVH2fhW0= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= +launchpad.net/xmlpath v0.0.0-20130614043138-000000000004/go.mod h1:vqyExLOM3qBx7mvYRkoxjSCF945s0mbe7YynlKYXtsA= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sourcegraph.com/sourcegraph/appdash v0.0.0-20180531100431-4c381bd170b4 h1:VO9oZbbkvTwqLimlQt15QNdOOBArT2dw/bvzsMZBiqQ= +sourcegraph.com/sourcegraph/appdash v0.0.0-20180531100431-4c381bd170b4/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= +sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67 h1:e1sMhtVq9AfcEy8AXNb8eSg6gbzfdpYhoNqnPJa+GzI= +sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:L5q+DGLGOQFpo1snNEkLOJT2d1YTW66rWNzatr3He1k= diff --git a/tests/globalkilltest/proxy.go b/tests/globalkilltest/proxy.go new file mode 100644 index 0000000000000..2a6b95761ca51 --- /dev/null +++ b/tests/globalkilltest/proxy.go @@ -0,0 +1,73 @@ +// Copyright 2020 PingCAP, Inc. +// +// 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, +// See the License for the specific language governing permissions and +// limitations under the License. + +package globalkilltest + +import ( + "net" + + log "github.com/sirupsen/logrus" + "inet.af/tcpproxy" +) + +// pdProxy used to simulate "lost connection" between TiDB and PD. +// Add "close existed connection" to `tcpproxy.Proxy`, which support closing listener only. +type pdProxy struct { + tcpproxy.Proxy + dialProxies []*pdDialProxy +} + +// AddRoute implements the Proxy interface. +func (p *pdProxy) AddRoute(ipPort string, dest tcpproxy.Target) { + if dp, ok := dest.(*pdDialProxy); ok { + p.dialProxies = append(p.dialProxies, dp) + } + p.Proxy.AddRoute(ipPort, dest) +} + +func (p *pdProxy) closeAllConnections() { + for _, dp := range p.dialProxies { + dp.closeAllConnections() + } +} + +// pdDialProxy add "close existed connections" to `tcpproxy.DialProxy`, +// which support closing listener only. +type pdDialProxy struct { + tcpproxy.DialProxy + connections []net.Conn +} + +// HandleConn implements the Target interface. +func (dp *pdDialProxy) HandleConn(src net.Conn) { + dp.connections = append(dp.connections, tcpproxy.UnderlyingConn(src)) + dp.DialProxy.HandleConn(src) +} + +func (dp *pdDialProxy) closeAllConnections() { + for _, conn := range dp.connections { + if err := conn.Close(); err != nil { // Notice: will close a connection twice. Ignore for test purpose. + log.Errorf("closeAllConnections err: %v", err) + } + } +} + +// to is shorthand way of new pdDialProxy. +func to(addr string) *pdDialProxy { + return &pdDialProxy{ + DialProxy: tcpproxy.DialProxy{ + Addr: addr, + KeepAlivePeriod: -1, + }, + } +} diff --git a/tests/globalkilltest/run-tests.sh b/tests/globalkilltest/run-tests.sh new file mode 100755 index 0000000000000..8c9a71b4a0b0c --- /dev/null +++ b/tests/globalkilltest/run-tests.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +# Copyright 2020 PingCAP, Inc. + +# 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, +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu +trap 'set +e; PIDS=$(jobs -p); [ -n "$PIDS" ] && kill -9 $PIDS' EXIT + +function help_message() +{ + echo "Usage: $0 [options]" + echo ' + -h: Print this help message. + + -L : Log level of testing. Defaults to "info". + + --server_log_level : Log level of TiDB server. Defaults to "info". + + --tmp : Temporary files path. Defaults to "/tmp/tidb_globalkilltest". + + -s : Use tidb-server in for testing. + Defaults to "bin/globalkilltest_tidb-server". + + --tidb_start_port : First TiDB server listening port. port ~ port+2 will be used. + Defaults to "5000". + + --tidb_status_port : First TiDB server status listening port. port ~ port+2 will be used. + Defaults to "8000". + + --pd : PD client path, ip:port list seperated by comma. + Defaults to "127.0.0.1:2379". + + --pd_proxy_port : PD proxy port. PD proxy is used to simulate lost connection between TiDB and PD. + Defaults to "3379". + + --conn_lost : Lost connection to PD timeout, + should be the same as TiDB ldflag . + See tidb/Makefile for detail. + Defaults to "5". + + --conn_restored : Time to check PD connection restored, + should be the same as TiDB ldflag + . + See tidb/Makefile for detail. + Defaults to "1". +' +} + +function go_tests() +{ + go test -args $* +} + +while getopts "h" opt; do + case $opt in + h) + help_message + exit 0 + ;; + esac +done + +go_tests +echo "globalkilltest end" diff --git a/tidb-server/main.go b/tidb-server/main.go index 33fdfb10e392e..aefd26368f80f 100644 --- a/tidb-server/main.go +++ b/tidb-server/main.go @@ -637,6 +637,7 @@ func createServer() { // Both domain and storage have started, so we have to clean them before exiting. terror.MustNil(err, closeDomainAndStorage) svr.SetDomain(dom) + svr.InitGlobalConnID(dom.ServerID) go dom.ExpensiveQueryHandle().SetSessionManager(svr).Run() dom.InfoSyncer().SetSessionManager(svr) } diff --git a/util/logutil/log.go b/util/logutil/log.go index 55bbc950c3ebd..38b51f159000d 100644 --- a/util/logutil/log.go +++ b/util/logutil/log.go @@ -346,18 +346,18 @@ func BgLogger() *zap.Logger { } // WithConnID attaches connId to context. -func WithConnID(ctx context.Context, connID uint32) context.Context { +func WithConnID(ctx context.Context, connID uint64) context.Context { var logger *zap.Logger if ctxLogger, ok := ctx.Value(ctxLogKey).(*zap.Logger); ok { logger = ctxLogger } else { logger = zaplog.L() } - return context.WithValue(ctx, ctxLogKey, logger.With(zap.Uint32("conn", connID))) + return context.WithValue(ctx, ctxLogKey, logger.With(zap.Uint64("conn", connID))) } // WithTraceLogger attaches trace identifier to context -func WithTraceLogger(ctx context.Context, connID uint32) context.Context { +func WithTraceLogger(ctx context.Context, connID uint64) context.Context { var logger *zap.Logger if ctxLogger, ok := ctx.Value(ctxLogKey).(*zap.Logger); ok { logger = ctxLogger @@ -367,11 +367,11 @@ func WithTraceLogger(ctx context.Context, connID uint32) context.Context { return context.WithValue(ctx, ctxLogKey, wrapTraceLogger(ctx, connID, logger)) } -func wrapTraceLogger(ctx context.Context, connID uint32, logger *zap.Logger) *zap.Logger { +func wrapTraceLogger(ctx context.Context, connID uint64, logger *zap.Logger) *zap.Logger { return logger.WithOptions(zap.WrapCore(func(core zapcore.Core) zapcore.Core { tl := &traceLog{ctx: ctx} traceCore := zaplog.NewTextCore(zaplog.NewTextEncoder(&zaplog.Config{}), tl, tl). - With([]zapcore.Field{zap.Uint32("conn", connID)}) + With([]zapcore.Field{zap.Uint64("conn", connID)}) return zapcore.NewTee(traceCore, core) })) } diff --git a/util/logutil/log_test.go b/util/logutil/log_test.go index a0dd64b9968dd..4961aa28e98f1 100644 --- a/util/logutil/log_test.go +++ b/util/logutil/log_test.go @@ -215,7 +215,7 @@ func (s *testLogSuite) TestZapLoggerWithKeys(c *C) { conf := NewLogConfig("info", DefaultLogFormat, "", fileCfg, false) err := InitZapLogger(conf) c.Assert(err, IsNil) - connID := uint32(123) + connID := uint64(123) ctx := WithConnID(context.Background(), connID) s.testZapLogger(ctx, c, fileCfg.Filename, zapLogWithConnIDPattern) os.Remove(fileCfg.Filename) diff --git a/util/processinfo.go b/util/processinfo.go index 13f04bf16e655..0e589fdc556b8 100644 --- a/util/processinfo.go +++ b/util/processinfo.go @@ -15,8 +15,10 @@ package util import ( "crypto/tls" + "errors" "fmt" "strings" + "sync/atomic" "time" "github.com/pingcap/parser/mysql" @@ -147,5 +149,88 @@ type SessionManager interface { ShowProcessList() map[uint64]*ProcessInfo GetProcessInfo(id uint64) (*ProcessInfo, bool) Kill(connectionID uint64, query bool) + KillAllConnections() UpdateTLSConfig(cfg *tls.Config) + ServerID() uint64 +} + +// GlobalConnID is the global connection ID, providing UNIQUE connection IDs across the whole TiDB cluster. +// 64 bits version: +// 63 62 41 40 1 0 +// +--+---------------------+--------------------------------------+------+ +// | | serverId | local connId |markup| +// |=0| (22b) | (40b) | =1 | +// +--+---------------------+--------------------------------------+------+ +// 32 bits version(coming soon): +// 31 1 0 +// +-----------------------------+------+ +// | ??? |markup| +// | ??? | =0 | +// +-----------------------------+------+ +type GlobalConnID struct { + ServerID uint64 + LocalConnID uint64 + Is64bits bool + ServerIDGetter func() uint64 +} + +const ( + // MaxServerID is maximum serverID. + MaxServerID = 1<<22 - 1 +) + +func (g *GlobalConnID) makeID(localConnID uint64) uint64 { + var ( + id uint64 + serverID uint64 + ) + if g.ServerIDGetter != nil { + serverID = g.ServerIDGetter() + } else { + serverID = g.ServerID + } + if g.Is64bits { + id |= 0x1 + id |= localConnID & 0xff_ffff_ffff << 1 // 40 bits local connID. + id |= serverID & MaxServerID << 41 // 22 bits serverID. + } else { + // TODO: update after new design for 32 bits version. + id |= localConnID & 0x7fff_ffff << 1 // 31 bits local connID. + } + return id +} + +// ID returns the connection id +func (g *GlobalConnID) ID() uint64 { + return g.makeID(g.LocalConnID) +} + +// NextID returns next connection id +func (g *GlobalConnID) NextID() uint64 { + localConnID := atomic.AddUint64(&g.LocalConnID, 1) + return g.makeID(localConnID) +} + +// ParseGlobalConnID parses an uint64 to GlobalConnID. +// `isTruncated` indicates that older versions of the client truncated the 64-bit GlobalConnID to 32-bit. +func ParseGlobalConnID(id uint64) (g GlobalConnID, isTruncated bool, err error) { + if id&0x80000000_00000000 > 0 { + return GlobalConnID{}, false, errors.New("Unexpected connectionID excceeds int64") + } + if id&0x1 > 0 { + if id&0xffffffff_00000000 == 0 { + return GlobalConnID{}, true, nil + } + return GlobalConnID{ + Is64bits: true, + LocalConnID: (id >> 1) & 0xff_ffff_ffff, + ServerID: (id >> 41) & MaxServerID, + }, false, nil + } + // TODO: update after new design for 32 bits version. + return GlobalConnID{ + Is64bits: false, + LocalConnID: (id >> 1) & 0x7fff_ffff, + ServerID: 0, + }, false, nil } diff --git a/util/processinfo_test.go b/util/processinfo_test.go new file mode 100644 index 0000000000000..e00fccf3f988b --- /dev/null +++ b/util/processinfo_test.go @@ -0,0 +1,63 @@ +// Copyright 2020 PingCAP, Inc. +// +// 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, +// See the License for the specific language governing permissions and +// limitations under the License. + +package util_test + +import ( + . "github.com/pingcap/check" + "github.com/pingcap/tidb/util" +) + +var _ = Suite(&testProcessInfoSuite{}) + +type testProcessInfoSuite struct { +} + +func (s *testProcessInfoSuite) SetUpSuite(c *C) { +} + +func (s *testProcessInfoSuite) TearDownSuite(c *C) { +} + +func (s *testProcessInfoSuite) TestGlobalConnID(c *C) { + connID := util.GlobalConnID{ + Is64bits: true, + ServerID: 1001, + LocalConnID: 123, + } + c.Assert(connID.ID(), Equals, (uint64(1001)<<41)|(uint64(123)<<1)|1) + + next := connID.NextID() + c.Assert(next, Equals, (uint64(1001)<<41)|(uint64(124)<<1)|1) + + connID1, isTruncated, err := util.ParseGlobalConnID(next) + c.Assert(err, IsNil) + c.Assert(isTruncated, IsFalse) + c.Assert(connID1.ServerID, Equals, uint64(1001)) + c.Assert(connID1.LocalConnID, Equals, uint64(124)) + c.Assert(connID1.Is64bits, IsTrue) + + _, isTruncated, err = util.ParseGlobalConnID(101) + c.Assert(err, IsNil) + c.Assert(isTruncated, IsTrue) + + _, _, err = util.ParseGlobalConnID(0x80000000_00000321) + c.Assert(err, NotNil) + + connID2 := util.GlobalConnID{ + Is64bits: true, + ServerIDGetter: func() uint64 { return 2002 }, + LocalConnID: 123, + } + c.Assert(connID2.ID(), Equals, (uint64(2002)<<41)|(uint64(123)<<1)|1) +}