fix(cdc): failed to start when connects to pd with multiple endpoints and the 1st endpoint is not available (#4779) #5207
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an automated cherry-pick of #4779
What problem does this PR solve?
Issue Number: close #4777
What is changed and how it works?
Changed:
remove the
grpcTLSOption
in etcd client config,how it works:
etcd-io/etcd#11184 have provide an workaround to set authority to deal with the problem indicated in etcd-io/etcd#11180, what it does it to create an TransportCredentialsWithDialer interface which wraps the original
grpccredentials.TransportCredentials
. and its implementation here, thisTransportCredentialsWithDialer
will set authority to the corresponding enpoint atClientHandshake
period first, and then delegate other logic to originalTransportCredentials
, so as to ensure the authority is correct.But if we set
grpcTLSOption
in dialOptions, this will overwrite the existingTransportCredentialsWithDialer
with original grpcTransportCredentials
.tiflow/pkg/security/credential.go
Lines 52 to 57 in 20626ba
This PR will remove the the
grpcTLSOption
in etcd client config, thus won't overwrite the existingTransportCredentialsWithDialer
.Check List
Tests
Code changes
Side effects
Related changes
Release note