Skip to content

Commit

Permalink
restore: don't change TiDB config to support lightning via SQL (pingc…
Browse files Browse the repository at this point in the history
  • Loading branch information
lance6716 authored Jan 4, 2021
1 parent d1becd4 commit d89fe86
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions lightning/restore/checksum.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func newChecksumManager(ctx context.Context, rc *RestoreController) (ChecksumMan
return nil, errors.Trace(err)
}

// TODO: make tikv.Driver{}.Open use arguments instead of global variables
if tlsOpt.CAPath != "" {
conf := tidbcfg.GetGlobalConfig()
conf.Security.ClusterSSLCA = tlsOpt.CAPath
Expand Down
3 changes: 0 additions & 3 deletions lightning/restore/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
sstpb "github.com/pingcap/kvproto/pkg/import_sstpb"
"github.com/pingcap/parser/model"
"github.com/pingcap/tidb-lightning/lightning/glue"
tidbcfg "github.com/pingcap/tidb/config"
"github.com/pingcap/tidb/meta/autoid"
"github.com/pingcap/tidb/table"
"github.com/pingcap/tidb/table/tables"
Expand Down Expand Up @@ -73,8 +72,6 @@ const (
var DeliverPauser = common.NewPauser()

func init() {
cfg := tidbcfg.GetGlobalConfig()
cfg.Log.SlowThreshold = 3000
// used in integration tests
failpoint.Inject("SetMinDeliverBytes", func(v failpoint.Value) {
minDeliverBytes = uint64(v.(int))
Expand Down

0 comments on commit d89fe86

Please sign in to comment.