Skip to content

Commit

Permalink
Merge pull request pingcap#11 from lichunzhu/addLocal
Browse files Browse the repository at this point in the history
add local engine
  • Loading branch information
lichunzhu authored Jan 7, 2022
2 parents 14e3a55 + 70d15a5 commit e950ee2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ddl/sst/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ import (
"encoding/binary"
"encoding/json"
"fmt"

"github.com/pingcap/tidb/br/pkg/lightning/backend/local"
"github.com/pingcap/tidb/util/sqlexec"

"github.com/twmb/murmur3"

"github.com/pingcap/tidb/br/pkg/lightning/backend"
"github.com/pingcap/tidb/br/pkg/lightning/backend/kv"
"github.com/pingcap/tidb/br/pkg/lightning/checkpoints"
"github.com/pingcap/tidb/br/pkg/lightning/config"
"github.com/pingcap/tidb/br/pkg/lightning/log"
tidbcfg "github.com/pingcap/tidb/config"
"github.com/pingcap/tidb/util/logutil"
"github.com/twmb/murmur3"
)

func InitIndexOptimize() {
Expand Down Expand Up @@ -57,6 +59,11 @@ func PrepareIndexOp(ctx context.Context, ddl DDLInfo) error {
}
var cfg backend.EngineConfig
cfg.TableInfo = &cpt
cfg.Local = &backend.LocalEngineConfig{
Compact: true,
CompactThreshold: 1024 * _mb,
CompactConcurrency: 4,
}
//
var b [8]byte
binary.BigEndian.PutUint64(b[:], ddl.StartTs)
Expand Down

0 comments on commit e950ee2

Please sign in to comment.