@@ -28,6 +28,7 @@ import (
2828 "github.com/pingcap/tidb/pkg/executor/importer"
2929 "github.com/pingcap/tidb/pkg/ingestor/engineapi"
3030 "github.com/pingcap/tidb/pkg/ingestor/globalsort"
31+ "github.com/pingcap/tidb/pkg/ingestor/simplesst"
3132 tidbkv "github.com/pingcap/tidb/pkg/kv"
3233 "github.com/pingcap/tidb/pkg/lightning/backend/encode"
3334 "github.com/pingcap/tidb/pkg/objstore/storeapi"
@@ -43,13 +44,13 @@ import (
4344 "go.uber.org/zap"
4445)
4546
46- func writeConflictKVFile (t * testing.T , codec tikv.Codec , kvGroup string , objStore storeapi.Storage , kvs []* globalsort .KVPair ) * engineapi.ConflictInfo {
47+ func writeConflictKVFile (t * testing.T , codec tikv.Codec , kvGroup string , objStore storeapi.Storage , kvs []* simplesst .KVPair ) * engineapi.ConflictInfo {
4748 t .Helper ()
4849 ctx := context .Background ()
49- var summary * globalsort .WriterSummary
50- w := globalsort .NewWriterBuilder ().
50+ var summary * simplesst .WriterSummary
51+ w := simplesst .NewWriterBuilder ().
5152 SetTiKVCodec (codec ).
52- SetOnCloseFunc (func (s * globalsort .WriterSummary ) { summary = s }).
53+ SetOnCloseFunc (func (s * simplesst .WriterSummary ) { summary = s }).
5354 Build (objStore , "/test" , kvGroup )
5455 for _ , kv := range kvs {
5556 require .NoError (t , w .WriteRow (ctx , kv .Key , kv .Value , nil ))
@@ -78,22 +79,22 @@ func generateConflictKVFiles(t *testing.T, tempDir string, tbl table.Table, code
7879
7980 // total 3 * 2 conflicted data KVs, and 3 conflicted index KVs, they will be
8081 // taken as 9 conflicted rows.
81- dupDataKVs := make ([]* globalsort .KVPair , 0 , 6 )
82- dupIndexKVs := make ([]* globalsort .KVPair , 0 , 3 )
82+ dupDataKVs := make ([]* simplesst .KVPair , 0 , 6 )
83+ dupIndexKVs := make ([]* simplesst .KVPair , 0 , 3 )
8384 for i := range 3 {
8485 dupID := i + 1
8586 row := []types.Datum {types .NewDatum (dupID ), types .NewDatum (dupID ), types .NewDatum (dupID )}
8687 dupPairs , err2 := localEncoder .Encode (row , int64 (dupID ))
8788 require .NoError (t , err2 )
8889 for _ , pair := range dupPairs .Pairs {
8990 if tablecodec .IsRecordKey (pair .Key ) {
90- kv := & globalsort .KVPair {Key : pair .Key , Value : pair .Val }
91+ kv := & simplesst .KVPair {Key : pair .Key , Value : pair .Val }
9192 dupDataKVs = append (dupDataKVs , kv , kv )
9293 } else {
9394 indexID , err := tablecodec .DecodeIndexID (pair .Key )
9495 require .NoError (t , err )
9596 if indexID == 2 {
96- kv := & globalsort .KVPair {Key : pair .Key , Value : pair .Val }
97+ kv := & simplesst .KVPair {Key : pair .Key , Value : pair .Val }
9798 dupIndexKVs = append (dupIndexKVs , kv )
9899 }
99100 }
0 commit comments