Skip to content

Commit

Permalink
Revert "br: check the correct changefeed info when restore/import dat… (
Browse files Browse the repository at this point in the history
  • Loading branch information
3pointer authored Jan 13, 2024
1 parent 7d7be12 commit fe69d60
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 276 deletions.
15 changes: 1 addition & 14 deletions br/pkg/task/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -1069,20 +1069,7 @@ func checkTaskExists(ctx context.Context, cfg *RestoreConfig) error {
return err
}
if len(tasks) > 0 {
return errors.Errorf("log backup task is running: %s, "+
"please stop the task before restore, and after PITR operation finished, "+
"create log-backup task again and create a full backup on this cluster", tasks[0].Info.Name)
}

// check cdc changefeed
if cfg.CheckRequirements {
nameSet, err := utils.GetCDCChangefeedNameSet(ctx, etcdCLI)
if err != nil {
return err
}
if !nameSet.Empty() {
return errors.Errorf("%splease stop changefeed(s) before restore", nameSet.MessageToUser())
}
return errors.Errorf("log backup task is running: %s, please stop the task before restore, and after PITR operation finished, create log-backup task again and create a full backup on this cluster", tasks[0].Info.Name)
}
return nil
}
Expand Down
5 changes: 0 additions & 5 deletions br/pkg/utils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ go_library(
name = "utils",
srcs = [
"backoff.go",
"cdc.go",
"db.go",
"dyn_pprof_other.go",
"dyn_pprof_unix.go",
Expand Down Expand Up @@ -52,7 +51,6 @@ go_library(
"@com_github_tikv_client_go_v2//oracle",
"@com_github_tikv_client_go_v2//tikv",
"@com_github_tikv_pd_client//:client",
"@io_etcd_go_etcd_client_v3//:client",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//backoff",
"@org_golang_google_grpc//codes",
Expand All @@ -73,7 +71,6 @@ go_test(
timeout = "short",
srcs = [
"backoff_test.go",
"cdc_test.go",
"db_test.go",
"env_test.go",
"json_test.go",
Expand Down Expand Up @@ -115,8 +112,6 @@ go_test(
"@com_github_stretchr_testify//require",
"@com_github_tikv_client_go_v2//tikv",
"@com_github_tikv_pd_client//:client",
"@io_etcd_go_etcd_client_v3//:client",
"@io_etcd_go_etcd_tests_v3//integration",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//codes",
"@org_golang_google_grpc//status",
Expand Down
152 changes: 0 additions & 152 deletions br/pkg/utils/cdc.go

This file was deleted.

105 changes: 0 additions & 105 deletions br/pkg/utils/cdc_test.go

This file was deleted.

0 comments on commit fe69d60

Please sign in to comment.