priority: implement changes to child policy caching specified in A115#8997
Conversation
178649d to
0c5ef20
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8997 +/- ##
==========================================
- Coverage 83.04% 83.01% -0.04%
==========================================
Files 411 411
Lines 32892 32917 +25
==========================================
+ Hits 27316 27326 +10
- Misses 4181 4193 +12
- Partials 1395 1398 +3
🚀 New features to boost your workflow:
|
Why not just clear |
Oh, it's because we still want to cache lower priority children for awhile? |
Yes. That is what we decided. The original gRFC had two cases where we would cache the child. We are only eliminating one of them as part of A115. |
…grpc#8997) Summary of changes: - Add a new API to the `balancergroup` that allows removal of child policies with immediate effect, even when a cache is configured. - Make the `priority` LB use this new API when removing child policies that have been removed from its configuration. - This change is protected with an environment variable that turns on the new behavior by default. - Update the name generation algorithm to give higher preference to reuse names of existing priority (if there is a locality match) over lower priorities. - Fix a bunch of tests in the `priority` LB policy to ensure that they work with the *old* and *new* behavior. - Fix a couple of aggregate cluster tests such that they don't continuously handle the same NACKed resource from the management server. - Other minor cleanups in tests that I had to look at as part of making this change. RELEASE NOTES: * xds/priority: Stop caching child LB policies removed from the configuration. This will help reduce memory and cpu usage when localities are constantly switching between priorities.
Original PR: #8997 RELEASE NOTES: * xds/priority: Stop caching child LB policies removed from the configuration. This will help reduce memory and cpu usage when localities are constantly switching between priorities.
…grpc#8997) Summary of changes: - Add a new API to the `balancergroup` that allows removal of child policies with immediate effect, even when a cache is configured. - Make the `priority` LB use this new API when removing child policies that have been removed from its configuration. - This change is protected with an environment variable that turns on the new behavior by default. - Update the name generation algorithm to give higher preference to reuse names of existing priority (if there is a locality match) over lower priorities. - Fix a bunch of tests in the `priority` LB policy to ensure that they work with the *old* and *new* behavior. - Fix a couple of aggregate cluster tests such that they don't continuously handle the same NACKed resource from the management server. - Other minor cleanups in tests that I had to look at as part of making this change. RELEASE NOTES: * xds/priority: Stop caching child LB policies removed from the configuration. This will help reduce memory and cpu usage when localities are constantly switching between priorities.
Summary of changes:
balancergroupthat allows removal of child policies with immediate effect, even when a cache is configured.priorityLB use this new API when removing child policies that have been removed from its configuration.priorityLB policy to ensure that they work with the old and new behavior.RELEASE NOTES: