outlier detection LB: don't include channel args in subchannel map key (#30158)

pull/30160/head
Mark D. Roth 2 years ago committed by GitHub
parent 5e19c780c3
commit 183cdf277b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      BUILD
  2. 8
      src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc

@ -4389,6 +4389,7 @@ grpc_cc_library(
"ref_counted",
"ref_counted_ptr",
"server_address",
"sockaddr_utils",
],
)

@ -48,6 +48,7 @@
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
#include "src/core/ext/filters/client_channel/subchannel_interface.h"
#include "src/core/lib/address_utils/sockaddr_utils.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gpr/env.h"
@ -554,10 +555,9 @@ OutlierDetectionLb::~OutlierDetectionLb() {
std::string OutlierDetectionLb::MakeKeyForAddress(
const ServerAddress& address) {
// Strip off attributes to construct the key.
return ServerAddress(address.address(),
grpc_channel_args_copy(address.args()))
.ToString();
// Use only the address, not the attributes.
auto addr_str = grpc_sockaddr_to_string(&address.address(), false);
return addr_str.ok() ? addr_str.value() : addr_str.status().ToString();
}
void OutlierDetectionLb::ShutdownLocked() {

Loading…
Cancel
Save