Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: bump parser version for ticdc to ignore workload tables #12083

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix pd caller
Signed-off-by: xhe <xw897002528@gmail.com>
xhebox committed Mar 6, 2025
commit 37f494146069282789db49ff1c0aec1c6ac9a273
2 changes: 1 addition & 1 deletion cdc/api/v2/api_helpers.go
Original file line number Diff line number Diff line change
@@ -458,7 +458,7 @@ func (APIV2HelpersImpl) getPDClient(
}

pdClient, err := pd.NewClientWithContext(
ctx, "tiflow", pdAddrs, credential.PDSecurityOption(),
ctx, "", pdAddrs, credential.PDSecurityOption(),
pdopt.WithGRPCDialOptions(
grpcTLSOption,
grpc.WithBlock(),
2 changes: 1 addition & 1 deletion cdc/server/server.go
Original file line number Diff line number Diff line change
@@ -135,7 +135,7 @@ func (s *server) prepare(ctx context.Context) error {
}
log.Info("create pd client", zap.Strings("endpoints", s.pdEndpoints))
s.pdClient, err = pd.NewClientWithContext(
ctx, "tiflow", s.pdEndpoints, conf.Security.PDSecurityOption(),
ctx, "", s.pdEndpoints, conf.Security.PDSecurityOption(),
// the default `timeout` is 3s, maybe too small if the pd is busy,
// set to 10s to avoid frequent timeout.
pdopt.WithCustomTimeoutOption(10*time.Second),
2 changes: 1 addition & 1 deletion pkg/cmd/factory/factory_impl.go
Original file line number Diff line number Diff line change
@@ -138,7 +138,7 @@ func (f *factoryImpl) PdClient() (pd.Client, error) {
}

pdClient, err := pd.NewClientWithContext(
ctx, "tiflow", pdEndpoints, credential.PDSecurityOption(),
ctx, "", pdEndpoints, credential.PDSecurityOption(),
pdopt.WithMaxErrorRetry(maxGetPDClientRetryTimes),
// TODO(hi-rustin): add gRPC metrics to Options.
// See also: https://github.com/pingcap/tiflow/pull/2341#discussion_r673032407.
2 changes: 1 addition & 1 deletion pkg/migrate/migrate.go
Original file line number Diff line number Diff line change
@@ -135,7 +135,7 @@ func createPDClient(ctx context.Context,
return nil, errors.Trace(err)
}
return pd.NewClientWithContext(
ctx, "tiflow", pdEndpoints, conf.PDSecurityOption(),
ctx, "", pdEndpoints, conf.PDSecurityOption(),
pdopt.WithGRPCDialOptions(
grpcTLSOption,
grpc.WithBlock(),
2 changes: 1 addition & 1 deletion pkg/upstream/upstream.go
Original file line number Diff line number Diff line change
@@ -137,7 +137,7 @@ func initUpstream(ctx context.Context, up *Upstream, cfg CaptureTopologyCfg) err
// default upstream always use the pdClient pass from cdc server
if !up.isDefaultUpstream {
up.PDClient, err = pd.NewClientWithContext(
ctx, "tiflow", up.PdEndpoints, up.SecurityConfig.PDSecurityOption(),
ctx, "", up.PdEndpoints, up.SecurityConfig.PDSecurityOption(),
// the default `timeout` is 3s, maybe too small if the pd is busy,
// set to 10s to avoid frequent timeout.
pdopt.WithCustomTimeoutOption(10*time.Second),
2 changes: 1 addition & 1 deletion sync_diff_inspector/utils/pd.go
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ func GetPDClientForGC(ctx context.Context, db *sql.DB) (pd.Client, error) {
if same, err := checkSameCluster(ctx, db, pdAddrs); err != nil {
log.Info("[automatically GC] check whether fetched pd addr and TiDB belong to one cluster failed", zap.Strings("pd address", pdAddrs), zap.Error(err))
} else if same {
pdClient, err := pd.NewClientWithContext(ctx, "tiflow", pdAddrs, pd.SecurityOption{})
pdClient, err := pd.NewClientWithContext(ctx, "", pdAddrs, pd.SecurityOption{})
if err != nil {
log.Info("[automatically GC] create pd client to control GC failed", zap.Strings("pd address", pdAddrs), zap.Error(err))
return nil, err