diff --git a/cdc/api/validator.go b/cdc/api/validator.go index fbc85ac707a..eaffa22f76a 100644 --- a/cdc/api/validator.go +++ b/cdc/api/validator.go @@ -77,7 +77,8 @@ func verifyCreateChangefeedConfig( // Ensure the start ts is valid in the next 1 hour. const ensureTTL = 60 * 60 if err := gc.EnsureChangefeedStartTsSafety( - ctx, capture.PDClient, + ctx, + upStream.PDClient, model.DefaultChangeFeedID(changefeedConfig.ID), ensureTTL, changefeedConfig.StartTS); err != nil { if !cerror.ErrStartTsBeforeGC.Equal(err) { diff --git a/cdc/server.go b/cdc/server.go index e71fcc34122..85ac10e33d7 100644 --- a/cdc/server.go +++ b/cdc/server.go @@ -27,8 +27,6 @@ import ( "github.com/pingcap/errors" "github.com/pingcap/log" - tidbkv "github.com/pingcap/tidb/kv" - "github.com/pingcap/tiflow/cdc/contextutil" "github.com/prometheus/client_golang/prometheus" "go.etcd.io/etcd/client/pkg/v3/logutil" clientv3 "go.etcd.io/etcd/client/v3" @@ -48,7 +46,6 @@ import ( "github.com/pingcap/tiflow/pkg/httputil" "github.com/pingcap/tiflow/pkg/p2p" "github.com/pingcap/tiflow/pkg/tcpserver" - "github.com/pingcap/tiflow/pkg/version" p2pProto "github.com/pingcap/tiflow/proto/p2p" )