-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
clusterimpl: use gsb.UpdateClientConnState instead of switchTo, on receipt of config update #7567
clusterimpl: use gsb.UpdateClientConnState instead of switchTo, on receipt of config update #7567
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7567 +/- ##
=========================================
Coverage ? 81.73%
=========================================
Files ? 361
Lines ? 27818
Branches ? 0
=========================================
Hits ? 22738
Misses ? 3871
Partials ? 1209
|
6b07deb
to
0f5b421
Compare
0c2482c
to
51d0d75
Compare
943294d
to
07b3fd9
Compare
842c3d8
to
60a5a8e
Compare
caf1f0a
to
da66a18
Compare
@aranjans : Could you please handle any open comments here. Thanks. |
// Build config for the gracefulswitch balancer. It is safe to ignore JSON | ||
// marshaling errors here, since the config was already validated as part of | ||
// ParseConfig(). | ||
cfg := []map[string]any{{newConfig.ChildPolicy.Name: newConfig.ChildPolicy.Config}} | ||
cfgJSON, _ := json.Marshal(cfg) | ||
parsedCfg, err := gracefulswitch.ParseConfig(cfgJSON) | ||
if err != nil { | ||
return err | ||
} |
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.
Hmm... actually what is the reason for moving this block to be done after handling telemetry labels and drop/request counts?
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.
Ah, imo it won't matter when are we building the chilld config for gracefulswitch balancer. Does it?
Anyways, I have reverted that and updated the PR.
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.
Generally, it is a good idea to not make a change without a need for it.
…ceipt of config update (grpc#7567)
#7210 talks about not using deprecated APIs in the
gracefulswitch.Balancer
while switching the child policy on reciept of configuration update of clusterimpl. This PR makes the required changes for the same.RELEASE NOTES:
gsb.UpdateClientConnState
instead ofswitchTo
, on receipt of config update