Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
restore: don't change TiDB config to support lightning via SQL (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
lance6716 authored and glorv committed Jan 29, 2021
1 parent 1b9d7fb commit c04af0c
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 c04af0c

Please sign in to comment.