Skip to content

Commit

Permalink
Merge branch 'master' into drop-policy-apply-table
Browse files Browse the repository at this point in the history
  • Loading branch information
lcwangchao authored Sep 23, 2021
2 parents b6ae1cc + fae4678 commit 078fe50
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 160 deletions.
4 changes: 2 additions & 2 deletions br/pkg/lightning/backend/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -2411,10 +2411,10 @@ func (local *local) LocalWriter(ctx context.Context, cfg *backend.LocalWriterCon
return nil, errors.Errorf("could not find engine for %s", engineUUID.String())
}
engineFile := e.(*File)
return openLocalWriter(ctx, cfg, engineFile, local.localWriterMemCacheSize)
return openLocalWriter(cfg, engineFile, local.localWriterMemCacheSize)
}

func openLocalWriter(ctx context.Context, cfg *backend.LocalWriterConfig, f *File, cacheSize int64) (*Writer, error) {
func openLocalWriter(cfg *backend.LocalWriterConfig, f *File, cacheSize int64) (*Writer, error) {
w := &Writer{
local: f,
memtableSizeLimit: cacheSize,
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/lightning/backend/local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ func testLocalWriter(c *C, needSort bool, partitialSort bool) {
f.wg.Add(1)
go f.ingestSSTLoop()
sorted := needSort && !partitialSort
w, err := openLocalWriter(context.Background(), &backend.LocalWriterConfig{IsKVSorted: sorted}, f, 1024)
w, err := openLocalWriter(&backend.LocalWriterConfig{IsKVSorted: sorted}, f, 1024)
c.Assert(err, IsNil)

ctx := context.Background()
Expand Down
4 changes: 2 additions & 2 deletions br/pkg/restore/systable_restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (rc *Client) RestoreSystemSchemas(ctx context.Context, f filter.Filter) {
tablesRestored = append(tablesRestored, tableName.L)
}
}
if err := rc.afterSystemTablesReplaced(ctx, tablesRestored); err != nil {
if err := rc.afterSystemTablesReplaced(tablesRestored); err != nil {
for _, e := range multierr.Errors(err) {
log.Warn("error during reconfigurating the system tables", zap.String("database", sysDB), logutil.ShortError(e))
}
Expand Down Expand Up @@ -133,7 +133,7 @@ func (rc *Client) getDatabaseByName(name string) (*database, bool) {

// afterSystemTablesReplaced do some extra work for special system tables.
// e.g. after inserting to the table mysql.user, we must execute `FLUSH PRIVILEGES` to allow it take effect.
func (rc *Client) afterSystemTablesReplaced(ctx context.Context, tables []string) error {
func (rc *Client) afterSystemTablesReplaced(tables []string) error {
var err error
for _, table := range tables {
switch {
Expand Down
2 changes: 1 addition & 1 deletion planner/core/point_get_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ func tryWhereIn2BatchPointGet(ctx sessionctx.Context, selStmt *ast.SelectStmt) *
// To use the PointGetPlan the following rules must be satisfied:
// 1. For the limit clause, the count should at least 1 and the offset is 0.
// 2. It must be a single table select.
// 3. All the columns must be public and generated.
// 3. All the columns must be public and not generated.
// 4. The condition is an access path that the range is a unique key.
func tryPointGetPlan(ctx sessionctx.Context, selStmt *ast.SelectStmt, check bool) *PointGetPlan {
if selStmt.Having != nil {
Expand Down
Loading

0 comments on commit 078fe50

Please sign in to comment.