xds_cluster_manager LB: fix bug from #30044 (#31164)

* fix bugs

* iwyu
pull/31121/head
Mark D. Roth 2 years ago committed by GitHub
parent 2ec220a6b1
commit 951c9a860c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc

@ -50,6 +50,7 @@
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/validation_errors.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/json/json_args.h"
@ -548,6 +549,8 @@ void XdsClusterManagerLb::ClusterChild::DeactivateLocked() {
delayed_removal_timer_handle_ = engine_->RunAfter(
kChildRetentionInterval,
[self = Ref(DEBUG_LOCATION, "ClusterChild+timer")]() mutable {
ApplicationCallbackExecCtx application_exec_ctx;
ExecCtx exec_ctx;
self->xds_cluster_manager_policy_->work_serializer()->Run(
[self = std::move(self)]() { self->OnDelayedRemovalTimerLocked(); },
DEBUG_LOCATION);
@ -687,7 +690,7 @@ class XdsClusterManagerLbFactory : public LoadBalancingPolicyFactory {
OrphanablePtr<LoadBalancingPolicy> CreateLoadBalancingPolicy(
LoadBalancingPolicy::Args args) const override {
return MakeOrphanable<XdsClusterManagerLb>(std::move(args));
} // namespace
}
absl::string_view name() const override { return kXdsClusterManager; }
@ -705,7 +708,7 @@ class XdsClusterManagerLbFactory : public LoadBalancingPolicyFactory {
json, JsonArgs(),
"errors validating xds_cluster_manager LB policy config");
}
}; // namespace grpc_core
};
} // namespace

Loading…
Cancel
Save