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

restore: remove hack.String #112

Merged
merged 1 commit into from
Dec 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lightning/restore/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
verify "github.com/pingcap/tidb-lightning/lightning/verification"
tidbcfg "github.com/pingcap/tidb/config"
"github.com/pingcap/tidb/meta/autoid"
"github.com/pingcap/tidb/util/hack"
"github.com/pingcap/tidb/util/kvencoder"
"github.com/pkg/errors"
)
Expand Down Expand Up @@ -1387,7 +1386,7 @@ func (cr *chunkRestore) restore(

// sql -> kv
start = time.Now()
kvs, _, err := kvEncoder.SQL2KV(hack.String(buffer.Bytes()))
kvs, _, err := kvEncoder.SQL2KV(buffer.String())
encodeDur := time.Since(start)
encodeTotalDur += encodeDur
metric.BlockEncodeSecondsHistogram.Observe(encodeDur.Seconds())
Expand Down