Skip to content

Commit

Permalink
ebs br: fail backup when no tikv store (#53783)
Browse files Browse the repository at this point in the history
close #53784
  • Loading branch information
BornChanger authored Jun 12, 2024
1 parent e9da2c0 commit e785887
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion br/pkg/task/backup_ebs.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/pingcap/tidb/br/pkg/config"
"github.com/pingcap/tidb/br/pkg/conn"
"github.com/pingcap/tidb/br/pkg/conn/util"
berrors "github.com/pingcap/tidb/br/pkg/errors"
"github.com/pingcap/tidb/br/pkg/glue"
"github.com/pingcap/tidb/br/pkg/metautil"
"github.com/pingcap/tidb/br/pkg/pdutil"
Expand Down Expand Up @@ -100,7 +101,7 @@ func RunBackupEBS(c context.Context, g glue.Glue, cfg *BackupConfig) error {
storeCount := backupInfo.GetStoreCount()
if storeCount == 0 {
log.Info("nothing to backup")
return nil
return errors.Trace(errors.Annotate(berrors.ErrInvalidArgument, "store count is 0"))
}

if span := opentracing.SpanFromContext(ctx); span != nil && span.Tracer() != nil {
Expand Down

0 comments on commit e785887

Please sign in to comment.