|
|
@ -169,7 +169,7 @@ class WeightedTargetLb : public LoadBalancingPolicy { |
|
|
|
// The owning LB policy.
|
|
|
|
// The owning LB policy.
|
|
|
|
RefCountedPtr<WeightedTargetLb> weighted_target_policy_; |
|
|
|
RefCountedPtr<WeightedTargetLb> weighted_target_policy_; |
|
|
|
|
|
|
|
|
|
|
|
const std::string& name_; |
|
|
|
const std::string name_; |
|
|
|
|
|
|
|
|
|
|
|
uint32_t weight_; |
|
|
|
uint32_t weight_; |
|
|
|
|
|
|
|
|
|
|
@ -288,9 +288,8 @@ void WeightedTargetLb::UpdateLocked(UpdateArgs args) { |
|
|
|
const std::string& name = p.first; |
|
|
|
const std::string& name = p.first; |
|
|
|
auto it = targets_.find(name); |
|
|
|
auto it = targets_.find(name); |
|
|
|
if (it == targets_.end()) { |
|
|
|
if (it == targets_.end()) { |
|
|
|
it = targets_.emplace(std::make_pair(name, nullptr)).first; |
|
|
|
targets_.emplace(name, MakeOrphanable<WeightedChild>( |
|
|
|
it->second = MakeOrphanable<WeightedChild>( |
|
|
|
Ref(DEBUG_LOCATION, "WeightedChild"), name)); |
|
|
|
Ref(DEBUG_LOCATION, "WeightedChild"), it->first); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// Update all children.
|
|
|
|
// Update all children.
|
|
|
|