Skip to content

Commit

Permalink
Merge branch 'master' into bindinfo-comments-typo
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjinpeng87 committed Dec 10, 2021
2 parents af51a1d + 03b6a8e commit f729196
Show file tree
Hide file tree
Showing 34 changed files with 14,239 additions and 15,672 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
217 changes: 0 additions & 217 deletions br/pkg/cdclog/buffer.go

This file was deleted.

Loading

0 comments on commit f729196

Please sign in to comment.