Skip to content

Commit 3f825ba

Browse files
committed
Merge commit '510d0037b18f258f505abc6cf13a8128563e9359' into wenxuan/long-vector
* commit '510d0037b18f258f505abc6cf13a8128563e9359': *: upgrade pd client to make sure tso client initiate successfully (#58752) ttl, test: scale TTL workers during the fault tests (#58750) planner: improve warning messages for unsupported HASH_JOIN hints (#58646) planner: prealloc the slices in the SplitCorColAccessCondFromFilters (#58785) ddl: supports non-unique global index (#58678) util/stmtsummary: add the network traffic related fields (#58101) var: enable `pd_enable_follower_handle_region` as default (#58385) statistics: refactor stats meta handling to use DeltaUpdate for multi-table support (#58657) parser: move 'model' to 'ast' pkg (#58704) statistics: add recover to protect background task (#58739) disttask: cancel subtask context if scheduled away (#58615) *: don't handle live updates of column size (#58596) *: fix a bug for default_authentication_plugin (2) (#58723) dupdetect: gRPC cancel should trigger retry (#58542) *: fix a bug for default_authentication_plugin (#57391) distsql: Fix backoff execution info inaccurate issue (#58707)
2 parents 8a776af + 510d003 commit 3f825ba

File tree

629 files changed

+5865
-5746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

629 files changed

+5865
-5746
lines changed

DEPS.bzl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7050,13 +7050,13 @@ def go_deps():
70507050
name = "com_github_tikv_pd_client",
70517051
build_file_proto_mode = "disable_global",
70527052
importpath = "github.com/tikv/pd/client",
7053-
sha256 = "e46a55f684df2acf06f1081a8a32750ef99bc05e9a1d6508f5c8e605bf954642",
7054-
strip_prefix = "github.com/tikv/pd/[email protected]20241220053006-461b86adc78d",
7053+
sha256 = "a704b691889a87001a40bbcf40b69df8b0d801f063bf07bc15542088df15682a",
7054+
strip_prefix = "github.com/tikv/pd/[email protected]20250107032658-5c4ab57d68de",
70557055
urls = [
7056-
"http://bazel-cache.pingcap.net:8080/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20241220053006-461b86adc78d.zip",
7057-
"http://ats.apps.svc/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20241220053006-461b86adc78d.zip",
7058-
"https://cache.hawkingrei.com/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20241220053006-461b86adc78d.zip",
7059-
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20241220053006-461b86adc78d.zip",
7056+
"http://bazel-cache.pingcap.net:8080/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20250107032658-5c4ab57d68de.zip",
7057+
"http://ats.apps.svc/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20250107032658-5c4ab57d68de.zip",
7058+
"https://cache.hawkingrei.com/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20250107032658-5c4ab57d68de.zip",
7059+
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20250107032658-5c4ab57d68de.zip",
70607060
],
70617061
)
70627062
go_repository(

br/pkg/checkpoint/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ go_library(
2525
"//pkg/domain",
2626
"//pkg/kv",
2727
"//pkg/meta/model",
28-
"//pkg/parser/model",
28+
"//pkg/parser/ast",
2929
"//pkg/util",
3030
"//pkg/util/sqlexec",
3131
"@com_github_google_uuid//:uuid",
@@ -53,7 +53,7 @@ go_test(
5353
"//br/pkg/storage",
5454
"//br/pkg/utiltest",
5555
"//pkg/meta/model",
56-
"//pkg/parser/model",
56+
"//pkg/parser/ast",
5757
"@com_github_pingcap_failpoint//:failpoint",
5858
"@com_github_pingcap_kvproto//pkg/brpb",
5959
"@com_github_pingcap_kvproto//pkg/encryptionpb",

br/pkg/checkpoint/checkpoint_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"github.com/pingcap/tidb/br/pkg/storage"
3232
"github.com/pingcap/tidb/br/pkg/utiltest"
3333
"github.com/pingcap/tidb/pkg/meta/model"
34-
pmodel "github.com/pingcap/tidb/pkg/parser/model"
34+
"github.com/pingcap/tidb/pkg/parser/ast"
3535
"github.com/stretchr/testify/require"
3636
"github.com/tikv/client-go/v2/oracle"
3737
)
@@ -128,8 +128,8 @@ func TestCheckpointMetaForRestore(t *testing.T) {
128128
SQLs: []checkpoint.CheckpointIngestIndexRepairSQL{
129129
{
130130
IndexID: 1,
131-
SchemaName: pmodel.NewCIStr("2"),
132-
TableName: pmodel.NewCIStr("3"),
131+
SchemaName: ast.NewCIStr("2"),
132+
TableName: ast.NewCIStr("3"),
133133
IndexName: "4",
134134
AddSQL: "5",
135135
AddArgs: []any{"6", "7", "8"},
@@ -140,8 +140,8 @@ func TestCheckpointMetaForRestore(t *testing.T) {
140140
repairSQLs, err := checkpoint.LoadCheckpointIngestIndexRepairSQLs(ctx, se.GetSessionCtx().GetRestrictedSQLExecutor())
141141
require.NoError(t, err)
142142
require.Equal(t, repairSQLs.SQLs[0].IndexID, int64(1))
143-
require.Equal(t, repairSQLs.SQLs[0].SchemaName, pmodel.NewCIStr("2"))
144-
require.Equal(t, repairSQLs.SQLs[0].TableName, pmodel.NewCIStr("3"))
143+
require.Equal(t, repairSQLs.SQLs[0].SchemaName, ast.NewCIStr("2"))
144+
require.Equal(t, repairSQLs.SQLs[0].TableName, ast.NewCIStr("3"))
145145
require.Equal(t, repairSQLs.SQLs[0].IndexName, "4")
146146
require.Equal(t, repairSQLs.SQLs[0].AddSQL, "5")
147147
require.Equal(t, repairSQLs.SQLs[0].AddArgs, []any{"6", "7", "8"})
@@ -360,7 +360,7 @@ func TestCheckpointRestoreRunner(t *testing.T) {
360360

361361
exists := checkpoint.ExistsSstRestoreCheckpoint(ctx, s.Mock.Domain, checkpoint.SnapshotRestoreCheckpointDatabaseName)
362362
require.False(t, exists)
363-
exists = s.Mock.Domain.InfoSchema().SchemaExists(pmodel.NewCIStr(checkpoint.SnapshotRestoreCheckpointDatabaseName))
363+
exists = s.Mock.Domain.InfoSchema().SchemaExists(ast.NewCIStr(checkpoint.SnapshotRestoreCheckpointDatabaseName))
364364
require.False(t, exists)
365365
}
366366

@@ -545,7 +545,7 @@ func TestCheckpointLogRestoreRunner(t *testing.T) {
545545

546546
exists := checkpoint.ExistsLogRestoreCheckpointMetadata(ctx, s.Mock.Domain)
547547
require.False(t, exists)
548-
exists = s.Mock.Domain.InfoSchema().SchemaExists(pmodel.NewCIStr(checkpoint.LogRestoreCheckpointDatabaseName))
548+
exists = s.Mock.Domain.InfoSchema().SchemaExists(ast.NewCIStr(checkpoint.LogRestoreCheckpointDatabaseName))
549549
require.False(t, exists)
550550
}
551551

@@ -640,6 +640,6 @@ func TestCheckpointCompactedRestoreRunner(t *testing.T) {
640640

641641
exists = checkpoint.ExistsSstRestoreCheckpoint(ctx, s.Mock.Domain, checkpoint.CustomSSTRestoreCheckpointDatabaseName)
642642
require.False(t, exists)
643-
exists = s.Mock.Domain.InfoSchema().SchemaExists(pmodel.NewCIStr(checkpoint.CustomSSTRestoreCheckpointDatabaseName))
643+
exists = s.Mock.Domain.InfoSchema().SchemaExists(ast.NewCIStr(checkpoint.CustomSSTRestoreCheckpointDatabaseName))
644644
require.False(t, exists)
645645
}

br/pkg/checkpoint/log_restore.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"github.com/pingcap/tidb/br/pkg/glue"
2424
"github.com/pingcap/tidb/pkg/domain"
2525
"github.com/pingcap/tidb/pkg/meta/model"
26-
pmodel "github.com/pingcap/tidb/pkg/parser/model"
26+
"github.com/pingcap/tidb/pkg/parser/ast"
2727
"github.com/pingcap/tidb/pkg/util/sqlexec"
2828
)
2929

@@ -191,7 +191,7 @@ func ExistsLogRestoreCheckpointMetadata(
191191
dom *domain.Domain,
192192
) bool {
193193
return dom.InfoSchema().
194-
TableExists(pmodel.NewCIStr(LogRestoreCheckpointDatabaseName), pmodel.NewCIStr(checkpointMetaTableName))
194+
TableExists(ast.NewCIStr(LogRestoreCheckpointDatabaseName), ast.NewCIStr(checkpointMetaTableName))
195195
}
196196

197197
// A progress type for snapshot + log restore.
@@ -251,7 +251,7 @@ func ExistsCheckpointProgress(
251251
dom *domain.Domain,
252252
) bool {
253253
return dom.InfoSchema().
254-
TableExists(pmodel.NewCIStr(LogRestoreCheckpointDatabaseName), pmodel.NewCIStr(checkpointProgressTableName))
254+
TableExists(ast.NewCIStr(LogRestoreCheckpointDatabaseName), ast.NewCIStr(checkpointProgressTableName))
255255
}
256256

257257
// CheckpointTaskInfo is unique information within the same cluster id. It represents the last
@@ -298,12 +298,12 @@ func TryToGetCheckpointTaskInfo(
298298
}
299299

300300
type CheckpointIngestIndexRepairSQL struct {
301-
IndexID int64 `json:"index-id"`
302-
SchemaName pmodel.CIStr `json:"schema-name"`
303-
TableName pmodel.CIStr `json:"table-name"`
304-
IndexName string `json:"index-name"`
305-
AddSQL string `json:"add-sql"`
306-
AddArgs []any `json:"add-args"`
301+
IndexID int64 `json:"index-id"`
302+
SchemaName ast.CIStr `json:"schema-name"`
303+
TableName ast.CIStr `json:"table-name"`
304+
IndexName string `json:"index-name"`
305+
AddSQL string `json:"add-sql"`
306+
AddArgs []any `json:"add-args"`
307307
}
308308

309309
type CheckpointIngestIndexRepairSQLs struct {
@@ -321,7 +321,7 @@ func LoadCheckpointIngestIndexRepairSQLs(
321321

322322
func ExistsCheckpointIngestIndexRepairSQLs(ctx context.Context, dom *domain.Domain) bool {
323323
return dom.InfoSchema().
324-
TableExists(pmodel.NewCIStr(LogRestoreCheckpointDatabaseName), pmodel.NewCIStr(checkpointIngestTableName))
324+
TableExists(ast.NewCIStr(LogRestoreCheckpointDatabaseName), ast.NewCIStr(checkpointIngestTableName))
325325
}
326326

327327
func SaveCheckpointIngestIndexRepairSQLs(

br/pkg/checkpoint/restore.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"github.com/pingcap/tidb/br/pkg/glue"
2424
"github.com/pingcap/tidb/br/pkg/pdutil"
2525
"github.com/pingcap/tidb/pkg/domain"
26-
pmodel "github.com/pingcap/tidb/pkg/parser/model"
26+
"github.com/pingcap/tidb/pkg/parser/ast"
2727
"github.com/pingcap/tidb/pkg/util/sqlexec"
2828
)
2929

@@ -173,7 +173,7 @@ func ExistsSstRestoreCheckpoint(
173173
// we only check the existence of the checkpoint data table
174174
// because the checkpoint metadata is not used for restore
175175
return dom.InfoSchema().
176-
TableExists(pmodel.NewCIStr(dbName), pmodel.NewCIStr(checkpointDataTableName))
176+
TableExists(ast.NewCIStr(dbName), ast.NewCIStr(checkpointDataTableName))
177177
}
178178

179179
func RemoveCheckpointDataForSstRestore(ctx context.Context, dom *domain.Domain, se glue.Session, dbName string) error {

br/pkg/checkpoint/storage.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"github.com/pingcap/tidb/br/pkg/glue"
2828
"github.com/pingcap/tidb/pkg/domain"
2929
"github.com/pingcap/tidb/pkg/kv"
30-
pmodel "github.com/pingcap/tidb/pkg/parser/model"
30+
"github.com/pingcap/tidb/pkg/parser/ast"
3131
"github.com/pingcap/tidb/pkg/util/sqlexec"
3232
"go.uber.org/zap"
3333
)
@@ -89,7 +89,7 @@ const (
8989
)
9090

9191
// IsCheckpointDB checks whether the dbname is checkpoint database.
92-
func IsCheckpointDB(dbname pmodel.CIStr) bool {
92+
func IsCheckpointDB(dbname ast.CIStr) bool {
9393
return dbname.O == LogRestoreCheckpointDatabaseName ||
9494
dbname.O == SnapshotRestoreCheckpointDatabaseName ||
9595
dbname.O == CustomSSTRestoreCheckpointDatabaseName
@@ -333,7 +333,7 @@ func dropCheckpointTables(
333333
}
334334
}
335335
// check if any user table is created in the checkpoint database
336-
tables, err := dom.InfoSchema().SchemaTableInfos(ctx, pmodel.NewCIStr(dbName))
336+
tables, err := dom.InfoSchema().SchemaTableInfos(ctx, ast.NewCIStr(dbName))
337337
if err != nil {
338338
return errors.Trace(err)
339339
}

br/pkg/checksum/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ go_test(
4545
"//pkg/distsql",
4646
"//pkg/kv",
4747
"//pkg/meta/model",
48-
"//pkg/parser/model",
48+
"//pkg/parser/ast",
4949
"//pkg/sessionctx/variable",
5050
"//pkg/testkit",
5151
"//pkg/testkit/testsetup",

br/pkg/checksum/executor_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/pingcap/tidb/pkg/distsql"
1515
"github.com/pingcap/tidb/pkg/kv"
1616
"github.com/pingcap/tidb/pkg/meta/model"
17-
pmodel "github.com/pingcap/tidb/pkg/parser/model"
17+
"github.com/pingcap/tidb/pkg/parser/ast"
1818
"github.com/pingcap/tidb/pkg/sessionctx/variable"
1919
"github.com/pingcap/tidb/pkg/testkit"
2020
"github.com/stretchr/testify/require"
@@ -23,8 +23,8 @@ import (
2323
func getTableInfo(t *testing.T, mock *mock.Cluster, db, table string) *model.TableInfo {
2424
info, err := mock.Domain.GetSnapshotInfoSchema(math.MaxUint64)
2525
require.NoError(t, err)
26-
cDBName := pmodel.NewCIStr(db)
27-
cTableName := pmodel.NewCIStr(table)
26+
cDBName := ast.NewCIStr(db)
27+
cTableName := ast.NewCIStr(table)
2828
tableInfo, err := info.TableByName(context.Background(), cDBName, cTableName)
2929
require.NoError(t, err)
3030
return tableInfo.Meta()

br/pkg/glue/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ go_library(
1515
"//pkg/domain",
1616
"//pkg/kv",
1717
"//pkg/meta/model",
18-
"//pkg/parser/model",
18+
"//pkg/parser/ast",
1919
"//pkg/sessionctx",
2020
"@com_github_fatih_color//:color",
2121
"@com_github_pingcap_log//:log",

br/pkg/glue/glue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/pingcap/tidb/pkg/domain"
1010
"github.com/pingcap/tidb/pkg/kv"
1111
"github.com/pingcap/tidb/pkg/meta/model"
12-
pmodel "github.com/pingcap/tidb/pkg/parser/model"
12+
"github.com/pingcap/tidb/pkg/parser/ast"
1313
"github.com/pingcap/tidb/pkg/sessionctx"
1414
pd "github.com/tikv/pd/client"
1515
)
@@ -54,7 +54,7 @@ type Session interface {
5454
Execute(ctx context.Context, sql string) error
5555
ExecuteInternal(ctx context.Context, sql string, args ...any) error
5656
CreateDatabase(ctx context.Context, schema *model.DBInfo) error
57-
CreateTable(ctx context.Context, dbName pmodel.CIStr, table *model.TableInfo,
57+
CreateTable(ctx context.Context, dbName ast.CIStr, table *model.TableInfo,
5858
cs ...ddl.CreateTableOption) error
5959
CreatePlacementPolicy(ctx context.Context, policy *model.PolicyInfo) error
6060
Close()

0 commit comments

Comments
 (0)