-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
clientv3: Replace balancer with upstream grpc solution #12671
Conversation
f6e5e5d
to
69cf181
Compare
…_robin LB This commit significantly reduces volume of custom code in etcd client v3, while preserving full existing functionality.
69cf181
to
0b75fed
Compare
LGTM |
@jingyih any thoughts? |
if creds != nil { | ||
opts = append(opts, grpc.WithTransportCredentials(creds)) | ||
} else { | ||
opts = append(opts, grpc.WithInsecure()) | ||
} | ||
opts = append(opts, grpc.WithContextDialer(dialer)) | ||
grpc.WithDisableRetry() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a comment on this? So, now gRPC enables retry by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, now gRPC enables retry by default?
I don't think so.
// Retry is set if retry is explicitly enabled via "GRPC_GO_RETRY=on".
Retry = strings.EqualFold(os.Getenv(retryStr), "on")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this in follow up PR:
4a1c245#diff-2bbaa3c83234888775aabf7697076e8035451045c479938e03ebb5c929132679L209
In general we should replace clientv3 retry interceptors with RetryPolicy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clean migration!
Can we please add more comments and address other comments here?
Addresses comments from: etcd-io#12671 (review)
Addresses comments from: etcd-io#12671 (review)
Addresses comments from: etcd-io#12671 (review)
Addresses comments from: etcd-io#12671 (review)
Addresses comments from: etcd-io#12671 (review)
Addresses comments from: etcd-io#12671 (review)
Addresses comments from: etcd-io#12671 (review)
Addresses comments from: etcd-io#12671 (review)
… grpc solution Signed-off-by: Chao Chen <chaochn@amazon.com>
… grpc solution Signed-off-by: Chao Chen <chaochn@amazon.com>
… grpc solution Signed-off-by: Chao Chen <chaochn@amazon.com>
… grpc solution Signed-off-by: Chao Chen <chaochn@amazon.com>
[3.4] Backport #12671 clientv3: Replace balancer with upstream grpc solution
Replace custom balancer logic in clientv3 with grpc infrastructure:
This commit significantly reduces volume of custom code
in etcd client v3, while preserving full existing functionality.