Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func runBackupRawCommand(command *cobra.Command, cmdName string) error {
func NewBackupCommand() *cobra.Command {
command := &cobra.Command{
Use: "backup",
Short: "backup a TiDB cluster",
Short: "backup a TiDB/TiKV cluster",
SilenceUsage: false,
PersistentPreRunE: func(c *cobra.Command, args []string) error {
if err := Init(c); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func runRestoreCommand(command *cobra.Command, cmdName string) error {
func NewRestoreCommand() *cobra.Command {
command := &cobra.Command{
Use: "restore",
Short: "restore a TiKV cluster from a backup",
Short: "restore a TiDB/TiKV cluster",
SilenceUsage: false,
PersistentPreRunE: func(c *cobra.Command, args []string) error {
if err := Init(c); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/conn/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func NewMgr(
return nil, errors.Errorf("tikv cluster not health %+v", stores)
}

dom, err := g.BootstrapSession(storage)
dom, err := g.GetDomain(storage)
if err != nil {
return nil, errors.Trace(err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/glue/glue.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

// Glue is an abstraction of TiDB function calls used in BR.
type Glue interface {
BootstrapSession(store kv.Storage) (*domain.Domain, error)
GetDomain(store kv.Storage) (*domain.Domain, error)
CreateSession(store kv.Storage) (Session, error)
Open(path string, option pd.SecurityOption) (kv.Storage, error)

Expand Down
6 changes: 3 additions & 3 deletions pkg/gluetidb/glue.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ type tidbSession struct {
se session.Session
}

// BootstrapSession implements glue.Glue
func (Glue) BootstrapSession(store kv.Storage) (*domain.Domain, error) {
return session.BootstrapSession(store)
// GetDomain implements glue.Glue
func (Glue) GetDomain(store kv.Storage) (*domain.Domain, error) {
return session.GetDomain(store)
}

// CreateSession implements glue.Glue
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (pp *ProgressPrinter) goPrintProgress(
bar.Set(pb.Color, true)
bar.SetWriter(&wrappedWriter{name: pp.name})
} else {
tmpl := `{{string . "barName" | red}} {{ bar . "<" "-" (cycle . "-" "\\" "|" "/" ) "." ">"}} {{percent .}}`
tmpl := `{{string . "barName" | green}} {{ bar . "<" "-" (cycle . "-" "\\" "|" "/" ) "." ">"}} {{percent .}}`
bar = pb.ProgressBarTemplate(tmpl).Start64(pp.total)
bar.Set("barName", pp.name)
}
Expand Down