Skip to content

Commit

Permalink
Merge branch 'release-6.5' into cherry-pick-41358-to-release-6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
3pointer authored Apr 10, 2023
2 parents e996e36 + 1e3d9d2 commit 3c266ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ go_download_sdk(
"https://mirrors.aliyun.com/golang/{}",
"https://dl.google.com/go/{}",
],
version = "1.19.7",
version = "1.19.8",
)

go_register_toolchains(
Expand Down
10 changes: 1 addition & 9 deletions br/pkg/gluetidb/glue.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ func (gs *tidbSession) CreatePlacementPolicy(ctx context.Context, policy *model.
return d.CreatePlacementPolicyWithInfo(gs.se, policy, ddl.OnExistIgnore)
}

<<<<<<< HEAD
=======
// SplitBatchCreateTable provide a way to split batch into small batch when batch size is large than 6 MB.
// The raft entry has limit size of 6 MB, a batch of CreateTables may hit this limitation
// TODO: shall query string be set for each split batch create, it looks does not matter if we set once for all.
Expand All @@ -235,10 +233,8 @@ func (gs *tidbSession) SplitBatchCreateTable(schema model.CIStr, infos []*model.
return err
}

>>>>>>> 41c1250c265 (br: reused table id is disabled when restore a brand-new cluster (#41358))
// CreateTables implements glue.BatchCreateTableSession.
func (gs *tidbSession) CreateTables(ctx context.Context, tables map[string][]*model.TableInfo, cs ...ddl.CreateTableWithInfoConfigurier) error {
d := domain.GetDomain(gs.se).DDL()
var dbName model.CIStr

// Disable foreign key check when batch create tables.
Expand Down Expand Up @@ -266,12 +262,8 @@ func (gs *tidbSession) CreateTables(ctx context.Context, tables map[string][]*mo
cloneTables = append(cloneTables, table)
}
gs.se.SetValue(sessionctx.QueryString, queryBuilder.String())
<<<<<<< HEAD
err := d.BatchCreateTableWithInfo(gs.se, dbName, cloneTables, append(cs, ddl.OnExistIgnore)...)
if err != nil {
=======

if err := gs.SplitBatchCreateTable(dbName, cloneTables, cs...); err != nil {
>>>>>>> 41c1250c265 (br: reused table id is disabled when restore a brand-new cluster (#41358))
//It is possible to failure when TiDB does not support model.ActionCreateTables.
//In this circumstance, BatchCreateTableWithInfo returns errno.ErrInvalidDDLJob,
//we fall back to old way that creating table one by one
Expand Down

0 comments on commit 3c266ff

Please sign in to comment.