diff options
author | 2018-07-19 11:06:47 -0700 | |
---|---|---|
committer | 2018-07-19 11:06:47 -0700 | |
commit | c4ce804b91cbd824d6e5ed5cc4a8f532355eb414 (patch) | |
tree | edfa341a1f13821d27f5d02c69e3ccceb86bde40 /src | |
parent | d47779bc56f5e15b459a8e26fb642b7b6bb4699a (diff) | |
parent | 93579e9a773a91316f78a51707f04b3602271db4 (diff) |
Merge branch 'master' of https://github.com/grpc/grpc into channelz-grpclb
Diffstat (limited to 'src')
3 files changed, 9 insertions, 4 deletions
diff --git a/src/android/test/interop/app/src/main/cpp/grpc-interop.cc b/src/android/test/interop/app/src/main/cpp/grpc-interop.cc index bbdc84abdd..07834250d2 100644 --- a/src/android/test/interop/app/src/main/cpp/grpc-interop.cc +++ b/src/android/test/interop/app/src/main/cpp/grpc-interop.cc @@ -45,9 +45,10 @@ std::shared_ptr<grpc::testing::InteropClient> GetClient(const char* host, credentials = grpc::InsecureChannelCredentials(); } + grpc::testing::ChannelCreationFunc channel_creation_func = + std::bind(grpc::CreateChannel, host_port, credentials); return std::shared_ptr<grpc::testing::InteropClient>( - new grpc::testing::InteropClient( - grpc::CreateChannel(host_port, credentials), true, false)); + new grpc::testing::InteropClient(channel_creation_func, true, false)); } extern "C" JNIEXPORT jboolean JNICALL diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc index a19ddd1c0b..fc56a4961f 100644 --- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc @@ -217,7 +217,7 @@ class RoundRobin : public LoadBalancingPolicy { PickState* pending_picks_ = nullptr; /** our connectivity state tracker */ grpc_connectivity_state_tracker state_tracker_; - /// Lock and data used to capture snapshots of this channels child + /// Lock and data used to capture snapshots of this channel's child /// channels and subchannels. This data is consumed by channelz. gpr_mu child_refs_mu_; ChildRefsList child_subchannels_; diff --git a/src/core/lib/iomgr/lockfree_event.cc b/src/core/lib/iomgr/lockfree_event.cc index 5b6b79fa91..085fea40a4 100644 --- a/src/core/lib/iomgr/lockfree_event.cc +++ b/src/core/lib/iomgr/lockfree_event.cc @@ -89,7 +89,11 @@ void LockfreeEvent::DestroyEvent() { void LockfreeEvent::NotifyOn(grpc_closure* closure) { while (true) { - gpr_atm curr = gpr_atm_no_barrier_load(&state_); + /* This load needs to be an acquire load because this can be a shutdown + * error that we might need to reference. Adding acquire semantics makes + * sure that the shutdown error has been initialized properly before us + * referencing it. */ + gpr_atm curr = gpr_atm_acq_load(&state_); if (grpc_polling_trace.enabled()) { gpr_log(GPR_ERROR, "LockfreeEvent::NotifyOn: %p curr=%p closure=%p", this, (void*)curr, closure); |