Skip to content

Commit

Permalink
Merge branch 'master' into issue-28181
Browse files Browse the repository at this point in the history
  • Loading branch information
tisonkun authored Dec 10, 2021
2 parents 71ab420 + 93e2c12 commit bad7be5
Show file tree
Hide file tree
Showing 63 changed files with 9,642 additions and 11,705 deletions.
35 changes: 0 additions & 35 deletions br/cmd/br/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,6 @@ func runRestoreCommand(command *cobra.Command, cmdName string) error {
return nil
}

func runLogRestoreCommand(command *cobra.Command) error {
cfg := task.LogRestoreConfig{Config: task.Config{LogProgress: HasLogFile()}}
if err := cfg.ParseFromFlags(command.Flags()); err != nil {
command.SilenceUsage = false
return errors.Trace(err)
}

ctx := GetDefaultContext()
if cfg.EnableOpenTracing {
var store *appdash.MemoryStore
ctx, store = trace.TracerStartSpan(ctx)
defer trace.TracerFinishSpan(ctx, store)
}
if err := task.RunLogRestore(GetDefaultContext(), tidbGlue, &cfg); err != nil {
log.Error("failed to restore", zap.Error(err))
return errors.Trace(err)
}
return nil
}

func runRestoreRawCommand(command *cobra.Command, cmdName string) error {
cfg := task.RestoreRawConfig{
RawKvConfig: task.RawKvConfig{Config: task.Config{LogProgress: HasLogFile()}},
Expand Down Expand Up @@ -102,7 +82,6 @@ func NewRestoreCommand() *cobra.Command {
newFullRestoreCommand(),
newDBRestoreCommand(),
newTableRestoreCommand(),
newLogRestoreCommand(),
newRawRestoreCommand(),
)
task.DefineRestoreFlags(command.PersistentFlags())
Expand Down Expand Up @@ -149,20 +128,6 @@ func newTableRestoreCommand() *cobra.Command {
return command
}

func newLogRestoreCommand() *cobra.Command {
command := &cobra.Command{
Use: "cdclog",
Short: "(experimental) restore data from cdc log backup",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, _ []string) error {
return runLogRestoreCommand(cmd)
},
}
task.DefineFilterFlags(command, filterOutSysAndMemTables)
task.DefineLogRestoreFlags(command)
return command
}

func newRawRestoreCommand() *cobra.Command {
command := &cobra.Command{
Use: "raw",
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/backup/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ func skipUnsupportedDDLJob(job *model.Job) bool {
case model.ActionCreatePlacementPolicy,
model.ActionAlterPlacementPolicy,
model.ActionDropPlacementPolicy,
model.ActionAlterTablePartitionPolicy,
model.ActionAlterTablePartitionPlacement,
model.ActionModifySchemaDefaultPlacement,
model.ActionAlterTablePlacement,
model.ActionAlterTableAttributes,
Expand Down
217 changes: 0 additions & 217 deletions br/pkg/cdclog/buffer.go

This file was deleted.

Loading

0 comments on commit bad7be5

Please sign in to comment.